Skip to content

Commit 5575750

Browse files
committed
Check for unused functions in example code
1 parent dffdd0f commit 5575750

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/make/lib/lint/c/cppcheck.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ ifeq ($(FAIL_FAST), true)
140140
$(QUIET) $(FIND_C_EXAMPLES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
141141
echo ''; \
142142
echo "Linting file: $$file"; \
143-
$(CPPCHECK) $(CPPCHECK_FLAGS) --suppressions-list=$(CPPCHECK_SUPPRESSIONS_LIST_EXAMPLES) $$file || exit 1; \
143+
$(CPPCHECK) $(CPPCHECK_FLAGS) --enable=unusedFunction --suppressions-list=$(CPPCHECK_SUPPRESSIONS_LIST_EXAMPLES) $$file || exit 1; \
144144
done
145145
else
146146
$(QUIET) $(FIND_C_EXAMPLES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
147147
echo ''; \
148148
echo "Linting file: $$file"; \
149-
$(CPPCHECK) $(CPPCHECK_FLAGS) --suppressions-list=$(CPPCHECK_SUPPRESSIONS_LIST_EXAMPLES) $$file || echo 'Linting failed.'; \
149+
$(CPPCHECK) $(CPPCHECK_FLAGS) --enable=unusedFunction --suppressions-list=$(CPPCHECK_SUPPRESSIONS_LIST_EXAMPLES) $$file || echo 'Linting failed.'; \
150150
done
151151
endif
152152

0 commit comments

Comments
 (0)