From 59a86cbc7c5d5640b16ca9d8a99be979b11a4c68 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 14 Aug 2019 10:14:15 +0200 Subject: Makefile rule for static analyzer --- Makefile.in | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index e6dbd572..cf94e352 100644 --- a/Makefile.in +++ b/Makefile.in @@ -184,6 +184,14 @@ check: tests tests_run tests: $(tests_targets) tests_run: $(tests_targets_ok) +STATIC_CHECKERS := nullability.NullableDereferenced nullability.NullablePassedToNonnull nullability.NullableReturnedFromNonnull optin.portability.UnixAPI valist.CopyToSelf valist.Uninitialized valist.Unterminated +STATIC_SCAN_FLAGS := --force-analyze-debug-code -o $(objdir)/static-scan/ $(addprefix -enable-checker ,$(STATIC_CHECKERS)) + +static-scan: + $(E)echo Running static code analysis + $(Q)$(MAKE) clean + $(Q)scan-build $(STATIC_SCAN_FLAGS) $(MAKE) -$(MAKEFLAGS) + tags: cd $(srcdir) ; etags -lc `find $(dirs) -name *.[chY]` -- cgit v1.2.3 From b7482209065a03c3186d74e5e4129539ce7a3ce4 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Fri, 16 Aug 2019 21:15:49 +0200 Subject: Static check: Don't report dead code --- Makefile.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index cf94e352..2698e34d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -184,8 +184,9 @@ check: tests tests_run tests: $(tests_targets) tests_run: $(tests_targets_ok) -STATIC_CHECKERS := nullability.NullableDereferenced nullability.NullablePassedToNonnull nullability.NullableReturnedFromNonnull optin.portability.UnixAPI valist.CopyToSelf valist.Uninitialized valist.Unterminated -STATIC_SCAN_FLAGS := --force-analyze-debug-code -o $(objdir)/static-scan/ $(addprefix -enable-checker ,$(STATIC_CHECKERS)) +STATIC_CHECKERS_ENABLE := nullability.NullableDereferenced nullability.NullablePassedToNonnull nullability.NullableReturnedFromNonnull optin.portability.UnixAPI valist.CopyToSelf valist.Uninitialized valist.Unterminated +STATIC_CHECKERS_DISABLE := deadcode.DeadStores +STATIC_SCAN_FLAGS := --force-analyze-debug-code -o $(objdir)/static-scan/ $(addprefix -enable-checker ,$(STATIC_CHECKERS_ENABLE)) $(addprefix -disable-checker ,$(STATIC_CHECKERS_DISABLE)) static-scan: $(E)echo Running static code analysis -- cgit v1.2.3 From a08853a26989d343c507a41257dedcdea3befd73 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Sat, 17 Aug 2019 08:54:08 +0200 Subject: Static scanner and expensive debugging setup fix --- Makefile.in | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index 2698e34d..da6cd206 100644 --- a/Makefile.in +++ b/Makefile.in @@ -186,7 +186,7 @@ tests_run: $(tests_targets_ok) STATIC_CHECKERS_ENABLE := nullability.NullableDereferenced nullability.NullablePassedToNonnull nullability.NullableReturnedFromNonnull optin.portability.UnixAPI valist.CopyToSelf valist.Uninitialized valist.Unterminated STATIC_CHECKERS_DISABLE := deadcode.DeadStores -STATIC_SCAN_FLAGS := --force-analyze-debug-code -o $(objdir)/static-scan/ $(addprefix -enable-checker ,$(STATIC_CHECKERS_ENABLE)) $(addprefix -disable-checker ,$(STATIC_CHECKERS_DISABLE)) +STATIC_SCAN_FLAGS := -o $(objdir)/static-scan/ $(addprefix -enable-checker ,$(STATIC_CHECKERS_ENABLE)) $(addprefix -disable-checker ,$(STATIC_CHECKERS_DISABLE)) static-scan: $(E)echo Running static code analysis diff --git a/configure.ac b/configure.ac index 96f66644..eabb3d56 100644 --- a/configure.ac +++ b/configure.ac @@ -79,7 +79,7 @@ AC_ARG_VAR([BISON], [location of the Bison program]) AC_ARG_VAR([M4], [location of the M4 program]) if test "$enable_debug_expensive" = yes; then - enable_debug = yes + enable_debug=yes fi if test "$srcdir" = . ; then -- cgit v1.2.3