]> de.git.xonotic.org Git - xonotic/gmqcc.git/blob - splint.sh
Add specialized diagnostics for when predefined macros are used and ftepp predefined...
[xonotic/gmqcc.git] / splint.sh
1 #!/bin/sh
2
3 #these are stupid flags ... i.e to inhibit warnings that are just stupid
4 FLAGS_STUPID="\
5     -redef               \
6     -noeffect            \
7     -nullderef           \
8     -usedef              \
9     -type                \
10     -mustfreeonly        \
11     -nullstate           \
12     -varuse              \
13     -mustfreefresh       \
14     -compdestroy         \
15     -compmempass         \
16     -nullpass            \
17     -onlytrans           \
18     -predboolint         \
19     -boolops             \
20     -exportlocal         \
21     -incondefs           \
22     -macroredef          \
23     -retvalint           \
24     -nullret             \
25     -predboolothers      \
26     -globstate           \
27     -dependenttrans      \
28     -branchstate         \
29     -compdef             \
30     -temptrans           \
31     -usereleased         \
32     -warnposix"
33
34 #flags that have no place anywhere else
35 #mostly stupid
36 FLAGS_OTHERS="\
37     -shiftimplementation \
38     +charindex           \
39     -kepttrans           \
40     -unqualifiedtrans    \
41     +matchanyintegral    \
42     -bufferoverflowhigh  \
43     +voidabstract"
44
45 #these are flags that MAYBE shouldn't be required
46 # -nullassign should be surpressed in code with /*@null*/
47 # (although that might be odd?)
48 FLAGS_MAYBE="\
49     -nullassign          \
50     -unrecog             \
51     -casebreak           \
52     -retvalbool          \
53     -retvalother         \
54     -mayaliasunique      \
55     -realcompare         \
56     -observertrans       \
57     -shiftnegative       \
58     -freshtrans          \
59     -abstract            \
60     -statictrans"
61
62 #these are flags that shouldn't be required. I.e tofix in code so that
63 #these don't need to be here to onhibit the warning
64 # remove one flag from here at a time while fixing the code so that
65 FLAGS_TOFIX="\
66     -castfcnptr"
67
68
69 splint $FLAGS_STUPID $FLAGS_MAYBE $FLAGS_TOFIX $FLAGS_OTHERS *.c *.h