Skip to content

Commit

Permalink
Update cppcheck to not run posix and add some -U flags
Browse files Browse the repository at this point in the history
  • Loading branch information
caryr committed Jan 2, 2021
1 parent 51a171a commit 1d318c4
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 20 deletions.
3 changes: 2 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,11 @@ endif
rm -rf autom4te.cache

cppcheck: $(O:.o=.cc) $(srcdir)/dosify.c $(srcdir)/version.c
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
-UYYPARSE_PARAM -UYYPRINT -Ushort -Usize_t -Uyyoverflow \
-UYYTYPE_INT8 -UYYTYPE_INT16 -UYYTYPE_UINT8 -UYYTYPE_UINT16 \
-UYYSTYPE -U__SIZE_TYPE__ -Umalloc -Ufree \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

cppcheck-all:
Expand Down
2 changes: 1 addition & 1 deletion cadpli/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f $(INCLUDE_PATH) $^
cppcheck --enable=all --std=c99 --std=c++03 -f $(INCLUDE_PATH) $^

Makefile: $(srcdir)/Makefile.in ../config.status
cd ..; ./config.status --file=cadpli/$@
Expand Down
2 changes: 1 addition & 1 deletion driver-vpi/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: main.c
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f $(INCLUDE_PATH) $^
cppcheck --enable=all --std=c99 --std=c++03 -f $(INCLUDE_PATH) $^

Makefile: $(srcdir)/Makefile.in ../config.status
cd ..; ./config.status --file=driver-vpi/$@
Expand Down
3 changes: 2 additions & 1 deletion driver/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
-UYY_USER_INIT \
-UYYPARSE_PARAM -UYYPRINT -Ushort -Uyyoverflow \
-UYYTYPE_INT8 -UYYTYPE_INT16 -UYYTYPE_UINT8 -UYYTYPE_UINT16 \
-UYYSTYPE -U__SIZE_TYPE__ -Umalloc -Usize_t -Ufree \
$(INCLUDE_PATH) $^

Makefile: $(srcdir)/Makefile.in ../config.status
Expand Down
2 changes: 1 addition & 1 deletion ivlpp/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f $(INCLUDE_PATH) $^
cppcheck --enable=all --std=c99 --std=c++03 -f $(INCLUDE_PATH) $^

Makefile: $(srcdir)/Makefile.in ../config.status
cd ..; ./config.status --file=ivlpp/$@
Expand Down
2 changes: 1 addition & 1 deletion libveriuser/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ distclean: clean
rm -f config.h stamp-config-h

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
2 changes: 1 addition & 1 deletion tgt-blif/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.cc)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
2 changes: 1 addition & 1 deletion tgt-fpga/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
2 changes: 1 addition & 1 deletion tgt-null/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
2 changes: 1 addition & 1 deletion tgt-pal/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
3 changes: 2 additions & 1 deletion tgt-pcb/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ distclean: clean
rm -f stamp-pcb_config-h pcb_config.h

cppcheck: $(O:.o=.cc)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
-UYY_USER_INIT \
-UYYPARSE_PARAM -UYYPRINT -Ushort -Usize_t -Uyyoverflow \
-UYYTYPE_INT8 -UYYTYPE_INT16 -UYYTYPE_UINT8 -UYYTYPE_UINT16 \
-UYYSTYPE -U__SIZE_TYPE__ -Ufree \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Makefile: $(srcdir)/Makefile.in ../config.status
Expand Down
2 changes: 1 addition & 1 deletion tgt-sizer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.cc)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
2 changes: 1 addition & 1 deletion tgt-stub/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
2 changes: 1 addition & 1 deletion tgt-verilog/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
2 changes: 1 addition & 1 deletion tgt-vhdl/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ distclean: clean
rm -f stamp-vhdl_config-h vhdl_config.h

cppcheck: $(O:.o=.cc)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
2 changes: 1 addition & 1 deletion tgt-vlog95/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ distclean: clean
rm -f Makefile config.log

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
2 changes: 1 addition & 1 deletion tgt-vvp/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ distclean: clean
rm -f stamp-vvp_config-h vvp_config.h

cppcheck: $(O:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Expand Down
3 changes: 2 additions & 1 deletion vhdlpp/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ distclean: clean
rm -f stamp-vhdlpp_config-h vhdlpp_config.h

cppcheck: $(O:.o=.cc)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
-UYY_USER_INIT \
-UYYPARSE_PARAM -UYYPRINT -Ushort -Usize_t -Uyyoverflow \
-UYYTYPE_INT8 -UYYTYPE_INT16 -UYYTYPE_UINT8 -UYYTYPE_UINT16 \
-UYYSTYPE -U__SIZE_TYPE__ -Ufree \
$(INCLUDE_PATH) $^

Makefile: $(srcdir)/Makefile.in
Expand Down
3 changes: 2 additions & 1 deletion vpi/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,12 @@ distclean: clean
# The -U flag is used to skip checking paths that depend on that define having
# an explicit value (i.e. the define is expected to be real code).
cppcheck: $(O:.o=.c) $(OPP:.o=.cc) $(M:.o=.c) $(V:.o=.c)
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
-UYY_USER_INIT \
-UYYPARSE_PARAM -UYYPRINT -Ushort -Uyyoverflow \
-UYYTYPE_INT8 -UYYTYPE_INT16 -UYYTYPE_UINT8 -UYYTYPE_UINT16 \
-UYYLTYPE -UYYSTYPE -U__SIZE_TYPE__ -Umalloc -Usize_t -Ufree \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Makefile: $(srcdir)/Makefile.in ../config.status
Expand Down
3 changes: 2 additions & 1 deletion vvp/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ distclean: clean
rm -f stamp-config-h config.h

cppcheck: $(O:.o=.cc) draw_tt.c
cppcheck --enable=all --std=posix --std=c99 --std=c++03 -f \
cppcheck --enable=all --std=c99 --std=c++03 -f \
--suppressions-list=$(srcdir)/cppcheck.sup \
-UMODULE_DIR1 -UMODULE_DIR2 -UYY_USER_INIT \
-UYYPARSE_PARAM -UYYPRINT -Ushort -Usize_t -Uyyoverflow \
-UYYTYPE_INT8 -UYYTYPE_INT16 -UYYTYPE_UINT8 -UYYTYPE_UINT16 \
-UYYSTYPE -UINFINITY -U__SIZE_TYPE__ -Ufree \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^

Makefile: $(srcdir)/Makefile.in
Expand Down

0 comments on commit 1d318c4

Please sign in to comment.