]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Make cppcheck understand confitems_lookup’s usage of confitem functions
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 14 Jan 2019 20:05:02 +0000 (21:05 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 14 Jan 2019 20:08:50 +0000 (21:08 +0100)
dev.mk.in

index 2f68f065c90a406649c628ca325058f206417a5a..cf6e17c71dec0fca1766eaecef9246bdbdfd5f5d 100644 (file)
--- a/dev.mk.in
+++ b/dev.mk.in
@@ -120,7 +120,7 @@ src/version.o: src/version.c
 define generate_gperf_lookup
 src/$(1)_lookup.c: src/$(1).gperf
        $$(if $$(quiet),@echo "  GEN      $$@")
-       $$(Q)$(2) $$< | $$(GPERF) >$$@.tmp
+       $$(Q)$(2) $$< | $$(GPERF) | sed 's/#error/#warning/' >$$@.tmp
 # Fix for gperf < 3.1 (fix parameter type and remove inlining of the get function):
        $$(Q)perl -00 -pi -e 's/unsigned int len/size_t len/; s/#ifdef __GNUC__.*?gnu_inline.*?#endif\n#endif\n//sg' $$@.tmp
        $$(Q)echo "size_t $(1)_count(void) { return $$$$(perl -ne '/TOTAL_KEYWORDS = (.+?),/ && print $$$$1' $$@.tmp); }" >>$$@.tmp
@@ -212,7 +212,7 @@ cppcheck:
        $(CPPCHECK) --suppressions-list=$(CPPCHECK_SUPPRESSIONS) \
          --inline-suppr -q --enable=all --force -I . \
          --template='cppcheck: warning: {id}:{file}:{line}: {message}' \
-         $(non_3pp_sources) src/main.c $(test_sources)
+         $(non_3pp_sources) src/confitems_lookup.c src/main.c $(test_sources)
 
 .PHONY: shellcheck
 shellcheck: test/suites/*.bash