Improve static analyzer report

This commit is contained in:
Patrick Pelissier committed 2024-04-29 22:35:27 +02:00
1 parent f8c79d9259
commit 2c81582419
2 files changed
+24 -2

No files matched your search

+2 -2
View File
@@ -254,9 +254,9 @@ sanitize:
.c.analyzer:
awk '/START_COVERAGE/ { printit=1} (printit == 0) { print }' $< > $<.first.c
awk ' printit { print } /END_COVERAGE/ { printit=1}' $< > $<.end.c
$(CC) $(CPPFLAGS) -E -DNDEBUG -DWITHIN_COVERAGE $< |grep -v '^#' |awk ' /END_COVERAGE/ { printit=0} printit { print } /START_COVERAGE/ { printit=1 }' |perl -p -e "s/;(?![\"'])/;\n/g ; s/}(?![\"'])/}\n/g ; s/{(?![\"'])/{\n/g" > $<.middle.c
$(CC) $(CPPFLAGS) -E -DWITHIN_ANALYZER $< |grep -v '^#' |awk ' /END_COVERAGE/ { printit=0} printit { print } /START_COVERAGE/ { printit=1 }' |perl -p -e "s/;(?![\"'])/;\n/g ; s/}(?![\"'])/}\n/g ; s/{(?![\"'])/{\n/g" > $<.middle.c
cat $<.first.c $<.middle.c $<.end.c > $<.c
$(CC) $(CPPFLAGS) -fanalyzer -Wall -W -Wno-analyzer-malloc-leak -O2 -g $<.c -o $<.exe 2> `basename $< .c`.analyzer $(LDFLAGS)
$(CC) $(CPPFLAGS) -fanalyzer -Wall -W -Wno-analyzer-malloc-leak -Wno-stringop-truncation -O2 -g $<.c -o $<.exe 2> `basename $< .c`.analyzer $(LDFLAGS)
$(RM) $<.first.c $<.end.c $<.middle.c $<.c $<.exe
analyze: