diff --git a/GNUmakefile b/GNUmakefile index 3080cd3..6549099 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -65,7 +65,9 @@ iwyu: clean $(SRC_O) $(TST_O) $(EXAMPLE_O) IWYU = include-what-you-use -Xiwyu --no_fwd_decls -Xiwyu --error=1 -Xiwyu --verbose=3 cppcheck: $(SRC_C) $(SRC_CXX) $(INC_H) $(EXAMPLE_C) $(TST_H) $(TST_C) - cppcheck $(^) --enable=warning,unusedFunction,performance,portability --suppressions-list=bld/cppcheck.supp --error-exitcode=1 $(CPPFLAGS) + # TODO: add --check-level=exhaustive when cppcheck ~2.14 is availble for CI + # cppcheck --enable=warning,unusedFunction,performance,portability --check-level=exhaustive --suppressions-list=bld/cppcheck.supp --error-exitcode=1 $(^) + cppcheck --enable=warning,unusedFunction,performance,portability --suppressions-list=bld/cppcheck.supp --error-exitcode=1 $(^) %-vg: VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all --gen-suppressions=all --suppressions=bld/vg.supp %-vg: % ; diff --git a/bld/cppcheck.supp b/bld/cppcheck.supp index 6075d6c..589de9a 100644 --- a/bld/cppcheck.supp +++ b/bld/cppcheck.supp @@ -1,3 +1,3 @@ unusedFunction:lib/col/*c unusedFunction:tst/wrap-log.c -unusedFunction:tst/util.c +unusedFunction:pro/*h diff --git a/inc/fs.h b/inc/fs.h index e3c2ce3..b960bf3 100644 --- a/inc/fs.h +++ b/inc/fs.h @@ -2,7 +2,7 @@ #define FS_H #include -#include +#include bool mkdir_p(char *path, mode_t mode); diff --git a/src/fs.c b/src/fs.c index 95fe89c..88d9635 100644 --- a/src/fs.c +++ b/src/fs.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "log.h" diff --git a/src/process.c b/src/process.c index 62b42ff..ec35f3c 100644 --- a/src/process.c +++ b/src/process.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "process.h" diff --git a/tst/tst-cfg-file.c b/tst/tst-cfg-file.c index 73cfed1..b94b874 100644 --- a/tst/tst-cfg-file.c +++ b/tst/tst-cfg-file.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "global.h" @@ -259,7 +260,7 @@ void cfg_file_write__existing(void **state) { FILE *f = fopen(cfg->file_path, "w"); assert_non_null(f); - assert_int_equal(fclose(f), 0); + fclose(f); char *expected = strdup("XXXX"); diff --git a/tst/tst-fs.c b/tst/tst-fs.c index 14c06a0..89dca42 100644 --- a/tst/tst-fs.c +++ b/tst/tst-fs.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "log.h" diff --git a/tst/tst-layout.c b/tst/tst-layout.c index 64aae2e..9fc03ca 100644 --- a/tst/tst-layout.c +++ b/tst/tst-layout.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include @@ -16,7 +15,6 @@ #include "log.h" #include "mode.h" #include "slist.h" -#include "util.h" #include "wlr-output-management-unstable-v1.h" struct SList *order_heads(struct SList *order_name_desc, struct SList *heads);