diff --git a/dist/tools/cppcheck/check.sh b/dist/tools/cppcheck/check.sh index 8ce836c24..3b4b6371e 100755 --- a/dist/tools/cppcheck/check.sh +++ b/dist/tools/cppcheck/check.sh @@ -8,7 +8,7 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. -: "${RIOTBASE:=$(cd $(dirname $0)/../../../; pwd)}" +: "${RIOTBASE:="$(cd "$(dirname "$0")/../../../" || exit ; pwd)"}" cd $RIOTBASE : "${RIOTTOOLS:=${RIOTBASE}/dist/tools}" @@ -24,7 +24,17 @@ else DEFAULT_SUPPRESSIONS=--suppress="unusedStructMember" fi -FILES="" +# These new changes allows process locally cppcheck tests. +CODE_FOLDERS="${RIOTBASE}/firmware/ \ + ${RIOTBASE}/boards/ \ + ${RIOTBASE}/examples/ \ + ${RIOTBASE}/tests/ \ + ${RIOTBASE}/wifi-subsys/"\ + +# If you want to check only with changed files +# change this file with +# FILES="" +FILES="${CODE_FOLDERS}" CPPCHECK_OPTIONS="" IN_FILES_SECTION=false while [ $# -gt 0 ]; do diff --git a/wifi-subsys/components/uart/src/at_handler.c b/wifi-subsys/components/uart/src/at_handler.c index a4fd73b87..04ac94999 100644 --- a/wifi-subsys/components/uart/src/at_handler.c +++ b/wifi-subsys/components/uart/src/at_handler.c @@ -50,6 +50,8 @@ char *symbols[4] = { "=", }; +/* cppcheck-suppress constParameter + * (reason: ) */ int get_symbol(char *command, size_t len, char *output) { for (size_t i = 0; i < len; i++) { for (size_t j = 0; j < 4; j++) { @@ -103,7 +105,7 @@ esp_err_t parse_at_message(uint8_t *at_command, at_request_t *output) { key2 = strtok(NULL, "+"); } - /* cppcheck-suppress nullPointerRedundantCheck + /* cppcheck-suppress nullPointer * (reason: ) */ memcpy(output->key, key_value, strlen(key_value) + 1); if (value != NULL) {