]> wimlib.net Git - wimlib/blobdiff - tools/run-sparse
Add script to run 'sparse' static analyzer
[wimlib] / tools / run-sparse
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