Add script to run 'sparse' static analyzer
authorEric Biggers <ebiggers3@gmail.com>
Thu, 17 Nov 2016 05:32:10 +0000 (21:32 -0800)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 17 Nov 2016 05:36:35 +0000 (21:36 -0800)
tools/run-sparse [new file with mode: 0755]

diff --git a/tools/run-sparse b/tools/run-sparse
new file mode 100755 (executable)
index 0000000..dafad10
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+for fil in src/*.c programs/imagex.c; do
+       sparse $fil -gcc-base-dir `gcc --print-file-name=`              \
+               -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -D_GNU_SOURCE    \
+               -I. -Iinclude -I/usr/include/libxml2                    \
+               -Wbitwise -Wpointer-subtraction-blows
+done