Added splint.sh (a progressive way to fix some possible bugs)
authorDale Weiler <killfieldengine@gmail.com>
Fri, 28 Dec 2012 12:29:46 +0000 (12:29 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 28 Dec 2012 12:29:46 +0000 (12:29 +0000)
ir.h
splint.sh [new file with mode: 0755]

diff --git a/ir.h b/ir.h
index 05b7447d2e2daa391553b4400bae360f8a3a20ec..9f8e1fa4e9f0aec9657c88865aede0d3f42344e8 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -22,7 +22,7 @@
  */
 #ifndef GMQCC_IR_HDR
 #define GMQCC_IR_HDR
-
+#include "gmqcc.h"
 /* ir_value */
 
 typedef struct
diff --git a/splint.sh b/splint.sh
new file mode 100755 (executable)
index 0000000..fcce1b4
--- /dev/null
+++ b/splint.sh
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+#these are stupid flags ... i.e to inhibit warnings that are just stupid
+FLAGS_STUPID="\
+    -redef               \
+    -noeffect            \
+    -nullderef           \
+    -usedef              \
+    -type                \
+    -mustfreeonly        \
+    -nullstate           \
+    -varuse              \
+    -mustfreefresh       \
+    -compdestroy         \
+    -compmempass         \
+    -nullpass            \
+    -onlytrans           \
+    -predboolint         \
+    -boolops             \
+    -exportlocal         \
+    -retvalint           \
+    -nullret             \
+    -predboolothers      \
+    -globstate           \
+    -dependenttrans      \
+    -branchstate         \
+    -compdef             \
+    -temptrans           \
+    -usereleased         \
+    -warnposix"
+
+#flags that have no place anywhere else
+#mostly stupid
+FLAGS_OTHERS="\
+    -shiftimplementation \
+    +charindex           \
+    -kepttrans           \
+    -unqualifiedtrans    \
+    +matchanyintegral    \
+    -bufferoverflowhigh  \
+    +voidabstract"
+
+#these are flags that MAYBE shouldn't be required
+# -nullassign should be surpressed in code with /*@null*/
+# (although that might be odd?)
+FLAGS_MAYBE="\
+    -nullassign          \
+    -unrecog             \
+    -casebreak           \
+    -retvalbool          \
+    -retvalother         \
+    -mayaliasunique      \
+    -realcompare         \
+    -observertrans       \
+    -noret               \
+    -shiftnegative       \
+    -exitarg             \
+    -freshtrans          \
+    -abstract            \
+    -statictrans"
+
+#these are flags that shouldn't be required. I.e tofix in code so that
+#these don't need to be here to onhibit the warning
+# remove one flag from here at a time while fixing the code so that
+FLAGS_TOFIX="\
+    -boolcompare         \
+    -formatconst         \
+    -unreachable         \
+    -incondefs           \
+    -initallelements     \
+    -macroredef          \
+    -castfcnptr          \
+    -evalorder"
+
+
+splint $FLAGS_STUPID $FLAGS_MAYBE $FLAGS_TOFIX $FLAGS_OTHERS *.c *.h