Make cppcheck happy

This commit is contained in:
Thomas Klaehn 2019-07-17 15:22:50 +02:00
parent 1d358b1086
commit 62fc41d5c9
2 changed files with 5 additions and 1 deletions

View File

@ -36,7 +36,7 @@ C_FLAGS += -fpic
C_FLAGS += -O0 -g -Wall -Wextra -Werror
CPP_FLAGS += $(addprefix -I, $(INCLUDES))
CHECK_FLAGS = --enable=all --template=gcc --error-exitcode=1 --suppress=missingIncludeSystem
CHECK_FLAGS = --enable=all --template=gcc --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr $(C_SRCS)
C_SRCS = $(wildcard $(SRC_DIR)/*.c)
C_OBJS = $(patsubst $(SRC_DIR)%,$(OBJ_DIR)%,$(patsubst %.c,%.o,$(C_SRCS)))

View File

@ -32,6 +32,7 @@ static int ftdi_open(const struct gpio *gpio)
return EXIT_SUCCESS;
}
// cppcheck-suppress unusedFunction
int gpio_open(const struct gpio *gpio)
{
int res;
@ -72,6 +73,7 @@ int gpio_open(const struct gpio *gpio)
return EXIT_SUCCESS;
}
// cppcheck-suppress unusedFunction
int gpio_close(const struct gpio *gpio)
{
if(NULL == gpio) {
@ -90,6 +92,7 @@ int gpio_close(const struct gpio *gpio)
return EXIT_SUCCESS;
}
// cppcheck-suppress unusedFunction
int gpio_read(const struct gpio *gpio, unsigned int *value)
{
if(NULL == gpio || NULL == value) {
@ -134,6 +137,7 @@ int gpio_write(const struct gpio *gpio, unsigned int value)
return EXIT_SUCCESS;
}
// cppcheck-suppress unusedFunction
int gpio_toggle(const struct gpio *gpio)
{
int res;