Add a script to run 'sparse'

Add a script that runs the 'sparse' static analysis tool.

Signed-off-by: Eric Biggers <ebiggers@google.com>
diff --git a/scripts/run-sparse.sh b/scripts/run-sparse.sh
new file mode 100755
index 0000000..e68f448
--- /dev/null
+++ b/scripts/run-sparse.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0+
+
+set -e -u -o pipefail
+
+find . -name '*.c' | while read -r file; do
+	sparse "$file" -gcc-base-dir "$(gcc --print-file-name=)"	\
+		-D_FILE_OFFSET_BITS=64 -I. -Wbitwise
+done