]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Move splint.sh into the Makefile
authorDale Weiler <killfieldengine@gmail.com>
Mon, 7 Jan 2013 12:39:33 +0000 (12:39 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Mon, 7 Jan 2013 12:39:33 +0000 (12:39 +0000)
Makefile
splint.sh [deleted file]

index c5297d6bca36a06bbe53489bece99cc8428cbecd..876bdd965c0685f7cb37d778b7f42350fd91db97 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -76,6 +76,57 @@ else
 endif
 endif
 
+#splint flags
+SPLINTFLAGS =            \
+    -redef               \
+    -noeffect            \
+    -nullderef           \
+    -usedef              \
+    -type                \
+    -mustfreeonly        \
+    -nullstate           \
+    -varuse              \
+    -mustfreefresh       \
+    -compdestroy         \
+    -compmempass         \
+    -nullpass            \
+    -onlytrans           \
+    -predboolint         \
+    -boolops             \
+    -exportlocal         \
+    -incondefs           \
+    -macroredef          \
+    -retvalint           \
+    -nullret             \
+    -predboolothers      \
+    -globstate           \
+    -dependenttrans      \
+    -branchstate         \
+    -compdef             \
+    -temptrans           \
+    -usereleased         \
+    -warnposix           \
+    -shiftimplementation \
+    +charindex           \
+    -kepttrans           \
+    -unqualifiedtrans    \
+    +matchanyintegral    \
+    -bufferoverflowhigh  \
+    +voidabstract        \
+    -nullassign          \
+    -unrecog             \
+    -casebreak           \
+    -retvalbool          \
+    -retvalother         \
+    -mayaliasunique      \
+    -realcompare         \
+    -observertrans       \
+    -shiftnegative       \
+    -freshtrans          \
+    -abstract            \
+    -statictrans         \
+    -castfcnptr
+
 #standard rules
 default: all
 %.o: %.c
@@ -106,7 +157,7 @@ clean:
        rm -f *.o $(GMQCC) $(QCVM) $(TESTSUITE) *.dat
 
 splint:
-       @ ./splint.sh
+       @  splint $(SPLINTFLAGS) *.c *.h
 
 depend:
        @makedepend    -Y -w 65536 2> /dev/null \
diff --git a/splint.sh b/splint.sh
deleted file mode 100755 (executable)
index ecca177..0000000
--- a/splint.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/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         \
-    -incondefs           \
-    -macroredef          \
-    -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       \
-    -shiftnegative       \
-    -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="\
-    -castfcnptr"
-
-
-splint $FLAGS_STUPID $FLAGS_MAYBE $FLAGS_TOFIX $FLAGS_OTHERS *.c *.h