5 ** This file is used to generate the flag header files.
7 ** Don't forget to regenerate flag_codes.gen. (lost the Makefile...bleech!)
9 /* spec idem global mode args */
12 # define modeFlag FALSE, FALSE, FALSE, TRUE, ARG_NONE
14 # define plainFlag FALSE, FALSE, FALSE, FALSE, ARG_NONE
16 # define specialFlag TRUE, FALSE, FALSE, FALSE, ARG_NONE
18 # define plainSpecialFlag TRUE, FALSE, FALSE, FALSE, ARG_NONE
20 # define idemSpecialFlag TRUE, TRUE, FALSE, FALSE, ARG_NONE
22 # define valueFlag FALSE, FALSE, FALSE, FALSE, ARG_NUMBER
25 # define charFlag FALSE, FALSE, FALSE, FALSE, ARG_CHAR
28 # define modeValueFlag FALSE, FALSE, FALSE, TRUE, ARG_NUMBER
30 # define specialValueFlag TRUE, FALSE, FALSE, FALSE, ARG_NUMBER
32 # define debugFlag FALSE, TRUE, FALSE, FALSE, ARG_NONE
34 # define debugValueFlag FALSE, TRUE, FALSE, FALSE, ARG_NUMBER
36 # define specialDebugFlag TRUE, TRUE, FALSE, FALSE, ARG_NONE
38 # define globalFlag FALSE, FALSE, TRUE, FALSE, ARG_NONE
40 # define idemGlobalFlag FALSE, TRUE, TRUE, FALSE, ARG_NONE
42 # define globalValueFlag FALSE, FALSE, TRUE, FALSE, ARG_NUMBER
44 /* Note: type argument missing */
46 # define regStringFlag FALSE, FALSE, FALSE, FALSE
48 # define idemStringFlag FALSE, TRUE, FALSE, FALSE
50 # define globalStringFlag FALSE, FALSE, TRUE, FALSE
53 # define extraArgFlag FALSE, FALSE, FALSE, FALSE, ARG_SPECIAL
55 # define globalExtraArgFlag FALSE, FALSE, TRUE, FALSE, ARG_SPECIAL
57 # define globalFileFlag FALSE, FALSE, TRUE, FALSE, ARG_FILE
61 ** Note: the flag code must be on a separate line, since I'm
62 ** too stupid to write an awk/sed/whatever script that can separate
66 static flaglist flags =
69 ** Null Dereferences (Manual Section 2)
73 FK_NULL, FK_MEMORY, specialFlag,
76 "misuses of null pointer",
77 "A possibly null pointer is misused (sets nullderef, nullpass, "
78 "nullref, nullassign, and nullstate).",
82 FK_NULL, FK_MEMORY, modeFlag,
85 "possible dereferencce of null pointer",
86 "A possibly null pointer is dereferenced. Value is "
87 "either the result of a function which may return null "
88 "(in which case, code should check it is not null), or a "
89 "global, parameter or structure field declared with the "
94 FK_NULL, FK_MEMORY, modeFlag,
97 "possibly null pointer passed as formal with no null annotation",
98 "A possibly null pointer is passed as a parameter corresponding to "
99 "a formal parameter with no /*@null@*/ annotation. If NULL "
100 "may be used for this parameter, add a /*@null@*/ annotation "
101 "to the function parameter declaration.",
105 FK_NULL, FK_MEMORY, modeFlag,
108 "possibly null pointer returned as result with no null annotation",
109 "Function returns a possibly null pointer, but is not declared "
110 "using /*@null@*/ annotation of result. If function may "
111 "return NULL, add /*@null@*/ annotation to the return "
112 "value declaration.",
116 FK_NULL, FK_MEMORY, modeFlag,
119 "possibly null pointer reachable from a reference with no null annotation",
120 "A possibly null pointer is reachable from a parameter or global "
121 "variable that is not declared using a /*@null@*/ annotation.",
125 FK_NULL, FK_MEMORY, modeFlag,
128 "inconsistent assignment or initialization involving null pointer",
129 "A reference with no null annotation is assigned or initialized "
130 "to NULL. Use /*@null@*/ to declare the reference as "
131 "a possibly null pointer.",
136 ** Undefined Values (Section 3)
140 FK_DEF, FK_NONE, modeFlag,
143 "use before definition",
144 "An rvalue is used that may not be initialized to a value on some execution path.",
148 FK_MEMORY, FK_DEF, modeFlag,
151 "out storage not defined before return or scope exit",
152 "An out parameter or global is not defined before control is transferred.",
156 FK_MEMORY, FK_DEF, modeFlag,
159 "at least one field of a union must be defined",
160 "No field of a union is defined. Generally, one field of a union is "
161 "expected to be defined.",
165 FK_MEMORY, FK_DEF, modeFlag,
168 "parameter, return value or global completely defined",
169 "Storage derivable from a parameter, return value or global is "
170 "not defined. Use /*@out@*/ to denote passed or returned "
171 "storage which need not be defined.",
175 FK_DEF, FK_NONE, plainFlag,
178 "initializer sets all fields",
179 "Initializer does not set every field in the structure.",
183 FK_DEF, FK_NONE, plainFlag,
186 "initializer defines all array elements",
187 "Initializer does not define all elements of a declared array.",
191 FK_DEF, FK_NONE, plainFlag,
194 "initializer defines extra array elements",
195 "Initializer block contains more elements than the size of a declared array.",
200 FK_DEF, FK_IMPLICIT, modeFlag,
203 "pointer parameters to unspecified functions may be implicit out parameters",
212 FK_DECL, FK_TYPE, modeFlag,
215 "function, variable or constant redefined with inconsistent type",
216 "A function, variable or constant is redefined with a different type.",
220 FK_DECL, FK_TYPE, modeFlag,
223 "struct or enum type redefined with inconsistent fields or members",
224 "A struct, union or enum type is redefined with inconsistent fields or members.",
228 FK_TYPE, FK_NONE, modeFlag,
231 "dereferencce of a function type",
232 "A function type is dereferenced. The ANSI standard allows this "
233 "because of implicit conversion of function designators, however the "
234 "dereference is unnecessary.",
238 FK_OPS, FK_NONE, modeFlag,
241 "dangerous comparison between reals (dangerous because of inexact "
242 "floating point representations)",
243 "Two real (float, double, or long double) values are compared "
244 "directly using a C primitive. "
245 "This may produce unexpected results since floating point "
246 "representations are inexact. Instead, compare the difference to "
247 "FLT_EPSILON or DBL_EPSILON.",
251 FK_OPS, FK_NONE, modeFlag,
254 "comparison using <, <=, >= between an unsigned integral and zero constant",
255 "An unsigned value is used in a comparison with zero in a way that is either a bug or confusing.",
259 FK_OPS, FK_POINTER, modeFlag,
262 "arithmetic involving pointer and integer",
263 "Pointer arithmetic using pointer and integer.", 0, 0
266 FK_OPS, FK_POINTER, modeFlag,
268 FLG_NULLPOINTERARITH,
269 "arithmetic involving possibly null pointer and integer",
270 "Pointer arithmetic using a possibly null pointer and integer.", 0, 0
273 FK_OPS, FK_POINTER, modeFlag,
276 "comparison between pointer and number",
277 "A pointer is compared to a number.", 0, 0
280 FK_OPS, FK_TYPE, modeFlag,
283 "primitive operation does not type check strictly",
284 "A primitive operation does not type check strictly.", 0, 0
287 FK_OPS, FK_TYPE, modeFlag,
290 "a bitwise logical operator does not have unsigned operands",
291 "An operand to a bitwise operator is not an unsigned values. This "
292 "may have unexpected results depending on the signed "
293 "representations.", 0, 0
296 FK_OPS, FK_TYPE, modeFlag,
299 "a shift right operand may be negative",
300 "The right operand to a shift operator may be negative (behavior undefined).",
304 FK_OPS, FK_TYPE, modeFlag,
305 "shiftimplementation",
306 FLG_SHIFTIMPLEMENTATION,
307 "a shift left operand may be negative",
308 "The left operand to a shift operator may be negative (behavior is implementation-defined).",
312 FK_OPS, FK_TYPE, modeFlag,
315 "sizeof operator has a type argument",
316 "Operand of sizeof operator is a type. (Safer to use expression, "
317 "int *x = sizeof (*x); instead of sizeof (int).)",
321 FK_OPS, FK_TYPE, plainFlag,
323 FLG_SIZEOFFORMALARRAY,
324 "sizeof operator has an array formal parameter argument",
325 "Operand of a sizeof operator is a function parameter declared as "
326 "an array. The value of sizeof will be the size of a pointer to the "
327 "element type, not the number of elements in the array.",
331 FK_DECL, FK_TYPE, plainFlag,
333 FLG_FIXEDFORMALARRAY,
334 "formal parameter of type array is declared with size",
335 "A formal parameter is declared as an array with size. The size of the array "
336 "is ignored in this context, since the array formal parameter is treated "
341 FK_DECL, FK_TYPE, plainFlag,
344 "formal parameter has an incomplete type",
345 "A formal parameter is declared with an incomplete type.",
349 FK_DECL, FK_TYPE, plainFlag,
352 "formal parameter is an array",
353 "A formal parameter is declared as an array. This can be confusing, since "
354 "a formal array parameter is treated as a pointer.",
364 FK_BOOL, FK_NONE, regStringFlag, ARG_STRING,
367 "set name of boolean type (default bool)",
371 FK_BOOL, FK_NONE, regStringFlag, ARG_STRING,
374 "set name of boolean false (default FALSE)",
378 FK_BOOL, FK_NONE, regStringFlag, ARG_STRING,
381 "set name of boolean true (default TRUE)",
385 FK_BOOL, FK_HELP, plainFlag,
388 "type name is probably a boolean type but does not match default "
389 "boolean type name, \"bool\", and alternate name is not set",
390 "Use the -booltype, -boolfalse and -booltrue flags to change the "
391 "name of the default boolean type.",
396 FK_BOOL, FK_OPS, modeFlag,
399 "comparison between bools (dangerous because of multiple TRUE values)",
400 "Two bool values are compared directly using a C primitive. This "
401 "may produce unexpected results since all non-zero values are "
402 "considered TRUE, so different TRUE values may not be equal. "
403 "The file bool.h (included in splint/lib) provides bool_equal "
404 "for safe bool comparisons.", 0, 0
407 FK_BOOL, FK_OPS, modeFlag,
410 "primitive operation (!, && or ||) does not has a boolean argument",
411 "The operand of a boolean operator is not a boolean. Use +ptrnegate "
412 "to allow ! to be used on pointers.",
416 FK_BOOL, FK_POINTER, modeFlag,
419 "allow ! to be used on pointer operand",
420 "The operand of ! operator is a pointer.", 0, 0
423 FK_BOOL, FK_PRED,plainFlag,
426 "condition test (if, while or for) is an assignment",
427 "The condition test is an assignment expression. Probably, you mean "
428 "to use == instead of =. If an assignment is intended, add an "
429 "extra parentheses nesting (e.g., if ((a = b)) ...) to suppress "
434 FK_BOOL, FK_PRED, specialFlag,
437 "type of condition test (if, while or for) not bool (sets predboolint, "
438 "predboolptr and predboolothers)",
439 "Test expression type is not boolean.", 0, 0
442 FK_PRED, FK_BOOL, modeFlag,
445 "type of condition test (if, while or for) is an integral type",
446 "Test expression type is not boolean or int.", 0, 0
449 FK_BOOL, FK_PRED, modeFlag,
452 "type of condition test (if, while or for) is a pointer",
453 "Test expression type is not boolean.", 0, 0
456 FK_BOOL, FK_PRED, modeFlag,
459 "type of condition test (if, while or for) not bool, int or pointer",
460 "Test expression type is not boolean.", 0, 0
464 ** 4.3 Abstract types
468 FK_ABSTRACT, FK_NONE, plainFlag,
471 "data abstraction barriers",
472 "An abstraction barrier is broken. If necessary, use /*@access <type>@*/ to allow access to an abstract type.",
476 FK_ABSTRACT, FK_IMPLICIT, plainFlag,
479 "assume user type definitions are abstract (unless /*@concrete@*/ is used)",
487 FK_ABSTRACT, FK_NAMES, plainFlag,
490 "allow access to abstract types in definition module",
491 "The representation of an abstract type defined in <M>.<x> is "
492 "accessible anywhere in a file named <M>.<y>.",
496 FK_ABSTRACT, FK_NAMES, plainFlag,
499 "allow access to abstract types by file name convention",
500 "The representation of an abstract type named <t> is "
501 "accessible anywhere in a file named <t>.<x>.",
505 FK_ABSTRACT, FK_NAMES, plainFlag,
508 "allow access to abstract types by czech naming convention",
509 "The representation of an abstract type named <t> is accessible "
510 "in the definition of a function or constant named <t>_<name>",
514 FK_ABSTRACT, FK_NAMES, plainFlag,
517 "allow access to abstract types by slovak naming convention",
518 "The representation of an abstract type named <t> is accessible "
519 "in the definition of a function or constant named <t><Name>",
523 FK_ABSTRACT, FK_NAMES, plainFlag,
524 "accessczechoslovak",
525 FLG_ACCESSCZECHOSLOVAK,
526 "allow access to abstract types by czechoslovak naming convention",
527 "The representation of an abstract type named <t> is accessible "
528 "in the definition of a function or constant named <t>_<name> or <t><Name>",
532 FK_ABSTRACT, FK_NAMES, specialFlag,
535 "set accessmodule, accessfile and accessczech",
536 "Sets accessmodule, accessfile and accessczech",
540 /* 4.3.2 Mutability */
542 FK_ABSTRACT, FK_NONE, modeFlag,
545 "representation of mutable type has sharing semantics",
546 "LCL semantics requires that a mutable type exhibits sharing semantics. "
547 "In order for objects to be shared a indirection is necessary in the representation. "
548 "A mutable type may be represented by a pointer or an abstract mutable type. Handles "
549 "into static data are fine, too, but will generate this error message unless it is suppressed.",
555 ** Memory Management (5)
558 /* Deallocation Errors */
560 FK_MEMORY, FK_LEAK, modeFlag,
563 "freshly allocated storage not released before return or scope exit",
564 "A memory leak has been detected. Storage allocated locally "
565 "is not released before the last reference to it is lost.",
569 FK_MEMORY, FK_LEAK, modeFlag,
572 "only storage not released before return or scope exit",
573 "A memory leak has been detected. Only-qualified storage is not released before the last "
574 "reference to it is lost.",
578 FK_MEMORY, FK_LEAK, specialFlag,
581 "fresh or only storage not released before return or scope exit (sets mustfreefresh and mustfreeonly)",
582 "A memory leak has been detected.",
586 FK_MEMORY, FK_DEAD, modeFlag,
589 "storage used after release",
590 "Memory is used after it has been released (either by passing "
591 "as an only param or assigning to an only global).",
595 FK_MEMORY, FK_DEAD, modeFlag,
597 FLG_STRICTUSERELEASED,
598 "element used after it may have been released",
599 "Memory (through fetch) is used after it may have been released "
600 "(either by passing as an only param or assigning to an only global).",
604 FK_MEMORY, FK_LEAK, modeFlag,
607 "all only references derivable from void pointer out only parameter are released",
608 "A storage leak due to incomplete deallocation of a structure or deep "
609 "pointer is suspected. Unshared storage that is reachable from "
610 "a reference that is being deallocated has not yet been deallocated. "
611 "Splint assumes when an object is passed "
612 "as an out only void pointer that the outer object will be "
613 "deallocated, but the inner objects will not.",
617 FK_MEMORY, FK_LEAK, modeFlag,
620 "report complete destruction errors for array elements that "
621 "may have been released",
626 FK_MEMORY, FK_ARRAY, modeFlag,
629 "array elements are dependent storage",
630 "When an element is fetched from an array, Splint analysis is "
631 "not able to determine if the same element is reused. "
632 "If +deparrays, Splint will mark local storage assigned from "
633 "array fetches as dependent.",
637 FK_MEMORY, FK_NONE, modeFlag,
640 "storage has inconsistent states of alternate paths through a branch",
641 "The state of a variable is different depending on which branch "
642 "is taken. This means no annotation can sensibly be applied "
647 FK_MEMORY, FK_NONE, modeFlag,
649 FLG_STRICTBRANCHSTATE,
650 "storage through array fetch has inconsistent states of alternate "
651 "paths through a branch",
652 "The state of a variable through an array fetch is different depending "
653 "on which branch is taken. This means no annotation can sensibly be applied "
658 FK_MEMORY, FK_NONE, specialFlag,
661 "sets all dynamic memory checking flags (memimplicit, mustfree, mustdefine, "
662 "mustnotalias, null, memtrans)",
666 FK_MEMORY, FK_DEF, modeFlag,
669 "actual parameter matches alias kind of formal parameter completely ",
670 "Storage derivable from a parameter does not match the alias kind "
671 "expected for the formal parameter.",
675 FK_MEMORY, FK_DEAD, modeFlag,
678 "external reference to stack-allocated storage is created",
679 "A stack reference is pointed to by an external reference when the "
680 "function returns. The stack-allocated storage is destroyed "
681 "after the call, leaving a dangling reference.",
686 FK_MEMORY, FK_NONE, specialFlag,
689 "memory transfer errors (sets all *trans flags)",
690 "Memory is transferred in a way that violates annotations.",
694 FK_MEMORY, FK_NONE, modeFlag,
697 "dependent transfer errors",
698 "Dependent storage is transferred to a non-dependent reference.",
702 FK_MEMORY, FK_NONE, modeFlag,
705 "new reference transfer to reference counted reference",
706 "A new reference is transferred to a reference counted reference.",
710 FK_MEMORY, FK_NONE, modeFlag,
713 "only storage transferred to non-only reference (memory leak)",
714 "The only reference to this storage is transferred to another "
715 "reference (e.g., by returning it) that does not have the "
716 "only annotation. This may lead to a memory leak, since the "
717 "new reference is not necessarily released.",
721 FK_MEMORY, FK_NONE, modeFlag,
722 "onlyunqglobaltrans",
723 FLG_ONLYUNQGLOBALTRANS,
724 "only storage transferred to an unqualified global or "
725 "static reference (memory leak)",
726 "The only reference to this storage is transferred to another "
727 "reference that does not have an aliasing annotation. "
728 "This may lead to a memory leak, since the "
729 "new reference is not necessarily released.",
733 FK_MEMORY, FK_NONE, modeFlag,
736 "owned storage transferred to non-owned reference (memory leak)",
737 "The owned reference to this storage is transferred to another "
738 "reference (e.g., by returning it) that does not have the "
739 "owned annotation. This may lead to a memory leak, since the "
740 "new reference is not necessarily released.",
744 FK_MEMORY, FK_NONE, modeFlag,
747 "fresh storage transferred to non-only reference (memory leak)",
748 "Fresh storage (newly allocated in this function) is transferred "
749 "in a way that the obligation to release storage is not "
750 "propagated. Use the /*@only@*/ annotation to indicate "
751 "the a return value is the only reference to the returned "
756 FK_MEMORY, FK_NONE, modeFlag,
759 "shared storage transferred to non-shared reference",
760 "Shared storage is transferred to a non-shared reference. The other "
761 "reference may release storage needed by this reference.",
765 FK_MEMORY, FK_NONE, modeFlag,
768 "temp storage transferred to non-temporary reference",
769 "Temp storage (associated with a formal parameter) is transferred "
770 "to a non-temporary reference. The storage may be released "
771 "or new aliases created.",
775 FK_MEMORY, FK_NONE, modeFlag,
778 "kept storage transferred to non-temporary reference",
779 "storage is transferred "
780 "to a non-temporary reference after being passed as keep parameter. The storage may be released "
781 "or new aliases created.",
785 FK_MEMORY, FK_NONE, modeFlag,
788 "keep storage transferred inconsistently",
789 "Keep storage is transferred inconsistently --- either in a way "
790 "that may add a new alias to it, or release it.",
794 FK_MEMORY, FK_NONE, modeFlag,
797 "an immediate address (result of &) is transferred inconsistently",
798 "An immediate address (result of & operator) is transferred "
803 FK_MEMORY, FK_NONE, modeFlag,
806 "reference counted storage is transferred in an inconsistent way",
807 "Reference counted storage is transferred in a way that may not "
808 "be consistent with the reference count.",
812 FK_MEMORY, FK_NONE, modeFlag,
815 "static storage is transferred in an inconsistent way",
816 "Static storage is transferred in an inconsistent way.",
820 FK_MEMORY, FK_NONE, modeFlag,
823 "unqualified storage is transferred in an inconsistent way",
824 "Unqualified storage is transferred in an inconsistent way.",
828 FK_MEMORY, FK_NONE, modeFlag,
831 "static storage is used as an initial value in an inconsistent way",
832 "Static storage is used as an initial value in an inconsistent way.",
836 FK_MEMORY, FK_NONE, modeFlag,
837 "unqualifiedinittrans",
838 FLG_UNKNOWNINITTRANS,
839 "unqualified storage is used as an initial value in an inconsistent way",
840 "Unqualified storage is used as an initial value in an inconsistent way.",
844 FK_MEMORY, FK_NONE, modeFlag,
847 "report memory transfer errors for initializations to read-only string literals",
848 "A read-only string literal is assigned to a non-observer reference.",
852 FK_MEMORY, FK_PARAMS, modeFlag,
855 "passing a value as an un-annotated parameter clears its annotation",
859 /* 5.3 Implicit Memory Annotations */
862 FK_MEMORY, FK_NONE, modeFlag,
865 "string literals are read-only (error if one is modified or released)",
866 "String literals are read-only. An error is reported "
867 "if a string literal may be modified or released.",
871 FK_MEMORY, FK_IMPLICIT, modeFlag,
874 "memory errors for unqualified storage",
878 FK_MEMORY, FK_IMPLICIT, plainFlag,
881 "assume unannotated parameter is temp",
885 FK_MEMORY, FK_IMPLICIT, specialFlag,
888 "sets globimponly, retimponly, structimponly, specglobimponly, "
889 "specretimponly and specstructimponly",
893 FK_MEMORY, FK_IMPLICIT, specialFlag,
896 "sets globimponly, retimponly and structimponly",
900 FK_MEMORY, FK_IMPLICIT, specialFlag,
903 "sets specglobimponly, specretimponly and specstructimponly",
907 FK_MEMORY, FK_IMPLICIT, plainFlag,
910 "assume unannotated global storage is only",
914 FK_MEMORY, FK_IMPLICIT, plainFlag,
917 "assume unannotated returned storage is only",
921 FK_MEMORY, FK_IMPLICIT, plainFlag,
924 "assume unannotated structure field is only",
928 FK_MEMORY, FK_IMPLICIT, plainFlag,
931 "assume unannotated global storage is only",
935 FK_MEMORY, FK_IMPLICIT, plainFlag,
938 "assume unannotated returned storage is only",
942 FK_MEMORY, FK_IMPLICIT, plainFlag,
944 FLG_SPECSTRUCTIMPONLY,
945 "assume unannotated structure field is only",
949 /* Reference Counting */
957 /* 6.1 Aliasing warnings */
960 FK_ALIAS, FK_MEMORY, modeFlag,
963 "unique parameter is aliased",
964 "A unique or only parameter is aliased by some other parameter or visible global.",
968 FK_ALIAS, FK_MEMORY, modeFlag,
971 "unique parameter may be aliased",
972 "A unique or only parameter may be aliased by some other parameter or visible global.",
976 FK_ALIAS, FK_MEMORY, modeFlag,
979 "temp storage aliased at return point or scope exit",
980 "An alias has been added to a temp-qualifier parameter or global that is visible externally when the function returns. If the aliasing is needed, use the /*@shared@*/ annotation to indicate that new aliases to the parameter may be created.",
984 FK_ALIAS, FK_NONE, modeFlag,
987 "function returns alias to parameter or global",
988 "The returned value shares storage with a parameter or global. If a parameter is to be returned, use the returned qualifier. If the result is not modified, use the observer qualifier on the result type. Otherwise, exposed can be used, but limited checking is done.", 0, 0
991 /* Global aliasing */
993 FK_ALIAS, FK_GLOBALS, specialFlag,
996 "function returns with global aliasing external state (sets "
997 "checkstrictglobalias, checkedglobalias, checkmodglobalias and "
998 "uncheckedglobalias)",
999 "A global variable aliases externally-visible state when the function returns.",
1003 FK_ALIAS, FK_GLOBALS, modeFlag,
1004 "checkstrictglobalias",
1005 FLG_CHECKSTRICTGLOBALIAS,
1006 "function returns with a checkstrict global aliasing external state",
1007 "A global variable aliases externally-visible state when the function returns.",
1011 FK_ALIAS, FK_GLOBALS, modeFlag,
1013 FLG_CHECKEDGLOBALIAS,
1014 "function returns with a checked global aliasing external state",
1015 "A global variable aliases externally-visible state when the function returns.",
1019 FK_ALIAS, FK_GLOBALS, modeFlag,
1020 "checkmodglobalias",
1021 FLG_CHECKMODGLOBALIAS,
1022 "function returns with a checkmod global aliasing external state",
1023 "A global variable aliases externally-visible state when the function returns.",
1027 FK_ALIAS, FK_GLOBALS, modeFlag,
1028 "uncheckedglobalias",
1029 FLG_UNCHECKEDGLOBALIAS,
1030 "function returns with an unchecked global aliasing external state",
1031 "A global variable aliases externally-visible state when the function returns.",
1038 FK_MEMORY, FK_NONE, modeFlag,
1041 "exposure transfer errors",
1042 "Exposed storage is transferred to a non-exposed, non-observer reference.",
1046 FK_MEMORY, FK_NONE, modeFlag,
1049 "observer transfer errors",
1050 "Observer storage is transferred to a non-observer reference.",
1054 FK_EXPOSURE, FK_ABSTRACT, specialFlag,
1057 "abstract representation is exposed (sets assignexpose, retexpose, and castexpose)",
1058 "The internal representation of an abstract type is visible to the "
1059 "caller. This means clients may have access to a pointer "
1060 "into the abstract representation.",
1064 FK_EXPOSURE, FK_ABSTRACT, modeFlag,
1067 "abstract representation is exposed (return values only)",
1068 "The return value shares storage with an instance of an abstract "
1069 "type. This means clients may have access to a pointer into "
1070 "the abstract representation. Use the observer qualifier to "
1071 "return exposed storage that may not be modified by the "
1072 "client. Use the exposed qualifier to return modifiable "
1073 "(but not deallocatable) exposed storage (dangerous).",
1077 FK_EXPOSURE, FK_ABSTRACT, modeFlag,
1080 "abstract representation is exposed (assignments only)",
1081 "Storage internal to the representation of an abstract type is "
1082 "assigned to an external pointer. This means clients may "
1083 "have access to a pointer into the abstract representation. "
1084 "If the external pointer is a parameter, the exposed qualifier "
1085 "can be used to allow the assignment, however, this is "
1086 "considered dangerous programming practice.",
1090 FK_EXPOSURE, FK_ABSTRACT, modeFlag,
1093 "abstract representation is exposed through a cast",
1094 "Storage internal to the representation of an abstract type is exposed "
1095 "through a type cast. This means clients may have access to a "
1096 "pointer into the abstract representation.",
1100 FK_DECL, FK_TYPE, modeFlag,
1101 "redundantsharequal",
1102 FLG_REDUNDANTSHAREQUAL,
1103 "declaration uses observer qualifier that is always true",
1104 "A declaration of an immutable object uses a redundant observer qualifier.",
1108 FK_DECL, FK_TYPE, modeFlag,
1109 "misplacedsharequal",
1110 FLG_MISPLACEDSHAREQUAL,
1111 "declaration of unsharable storage uses sharing annotation",
1112 "A declaration of an unsharable object uses a sharing annotation.",
1117 ** 7. Function Interfaces
1120 /* 7.1 Modifications */
1123 FK_MODIFIES, FK_SPEC, plainFlag,
1126 "unspecified modification of caller-visible state",
1127 "An externally-visible object is modified by a function, but not "
1128 "listed in its modifies clause.",
1132 FK_MODIFIES, FK_SPEC, modeFlag,
1135 "specified modification is not detected",
1136 "An object listed in the modifies clause is not modified by the "
1137 "implementation of the function. The modification may not "
1138 "be detected if it is done through a call to an unspecified "
1143 FK_MODIFIES, FK_MEMORY, plainFlag,
1146 "possible modification of observer storage",
1147 "Storage declared with observer is possibly modified. Observer "
1148 "storage may not be modified.",
1152 FK_MODIFIES, FK_MEMORY, modeFlag,
1154 FLG_MODOBSERVERUNCON,
1155 "possible modification of observer storage through unconstrained call",
1156 "Storage declared with observer may be modified through a call to an "
1157 "unconstrained function.",
1161 FK_MODIFIES, FK_MEMORY, modeFlag,
1162 "modinternalstrict",
1163 FLG_MODINTERNALSTRICT,
1164 "possible modification of internal storage through function call",
1165 "A function that modifies internalState is called from a function that "
1166 "does not list internalState in its modifies clause",
1170 FK_MODIFIES, FK_UNSPEC, modeFlag,
1173 "report undocumented file system modifications (applies to unspecified "
1174 "functions if modnomods is set)",
1178 FK_MODIFIES, FK_UNSPEC, specialFlag,
1181 "modification in unspecified functions (sets modnomods, "
1182 "modglobunspec and modstrictglobsunspec)",
1186 FK_MODIFIES, FK_UNSPEC, modeFlag,
1189 "modification in a function with no modifies clause",
1190 "An externally-visible object is modified by a function with no "
1191 "/*@modifies@*/ comment. The /*@modifies ... @*/ control "
1192 "comment can be used to give a modifies list for an "
1193 "unspecified function.",
1197 FK_MODIFIES, FK_UNSPEC, modeFlag,
1200 "possible modification through a call to an unconstrained function",
1201 "An unconstrained function is called in a function body where "
1202 "modifications are checked. Since the unconstrained function "
1203 "may modify anything, there may be undetected modifications in "
1204 "the checked function.",
1208 FK_MODIFIES, FK_UNSPEC, modeFlag,
1211 "possible modification through a call to an unconstrained function in "
1212 "a function with no modifies clause",
1213 "An unconstrained function is called in a function body where "
1214 "modifications are checked. Since the unconstrained function "
1215 "may modify anything, there may be undetected modifications in "
1216 "the checked function.",
1220 FK_MODIFIES, FK_GLOBALS, modeFlag,
1221 "globsimpmodsnothing",
1222 FLG_GLOBALSIMPMODIFIESNOTHING,
1223 "functions declared with a globals list but no modifies clause are "
1224 "assumed to modify nothing",
1225 "An implicit modifies nothing clause is assumed for a function "
1226 "declared with a globals list but not modifies clause.",
1230 FK_MODIFIES, FK_GLOBALS, modeFlag,
1232 FLG_MODIFIESIMPNOGLOBALS,
1233 "functions declared with a modifies clause but no globals list "
1234 "are assumed to use no globals",
1235 "An implicit empty globals list is assumed for a function "
1236 "declared with a modifies clause but no globals list.",
1245 FK_GLOBALS, FK_NONE, modeFlag,
1248 "returns with global in inconsistent state (null or undefined)",
1249 "A global variable does not satisfy its annotations when control is transferred.",
1254 FK_GLOBALS, FK_SPEC, plainFlag,
1257 "undocumented use of a checked global variable",
1258 "A checked global variable is used in the function, but not listed in "
1259 "its globals clause. By default, only globals specified in .lcl "
1260 "files are checked. To check all globals, use +allglobals. To "
1261 "check globals selectively use /*@checked@*/ in the global "
1266 FK_GLOBALS, FK_SPEC, modeFlag,
1269 "global listed for a function not used",
1270 "A global variable listed in the function's globals list is not used "
1271 "in the body of the function.",
1275 FK_GLOBALS, FK_NONE, modeFlag,
1278 "use of internalState",
1279 "A called function uses internal state, but the globals list for the "
1280 "function being checked does not include internalState",
1284 FK_GLOBALS, FK_NONE, modeFlag,
1285 "internalglobsnoglobs",
1286 FLG_INTERNALGLOBSNOGLOBS,
1287 "use of internalState (in function with no globals list)",
1288 "A called function uses internal state, but the function being checked "
1289 "has no globals list",
1293 FK_GLOBALS, FK_MODIFIES, modeFlag,
1295 FLG_WARNMISSINGGLOBALS,
1296 "global variable used in modifies clause is not listed in globals list",
1297 "A global variable is used in the modifies clause, but it is not listed in "
1298 "the globals list. The variable will be added to the globals list.",
1303 FK_GLOBALS, FK_MODIFIES, modeFlag,
1304 "warnmissingglobsnoglobs",
1305 FLG_WARNMISSINGGLOBALSNOGLOBS,
1306 "global variable used in modifies clause in a function with no globals list",
1307 "A global variable is used in the modifies clause, but the function "
1308 "has no globals list. The variable will be added to the globals list.",
1312 FK_GLOBALS, FK_UNSPEC, modeFlag,
1315 "use of checked global in a function with no globals list or specification",
1316 "A specified global variable is used in the function, but not listed "
1317 "in its globals list. Without +globnoglobs, only globals "
1318 "declared with /*@checkedstrict@*/ will produce use "
1319 "errors in functions without globals "
1320 "lists. The /*@globals ... @*/ control comment can be used to give "
1321 "a globals list for an unspecified function.",
1325 FK_GLOBALS, FK_IMPLICIT, modeFlag,
1328 "report use and modification errors for globals not annotated with unchecked",
1332 FK_GLOBALS, FK_UNSPEC, modeFlag,
1334 FLG_CHECKSTRICTGLOBALS,
1335 "report use and modification errors for checkedstrict globals",
1339 FK_GLOBALS, FK_UNSPEC, modeFlag,
1340 "impcheckedspecglobs",
1341 FLG_IMPCHECKEDSPECGLOBALS,
1342 "assume checked qualifier for unqualified global declarations in .lcl files",
1346 FK_GLOBALS, FK_UNSPEC, modeFlag,
1347 "impcheckmodspecglobs",
1348 FLG_IMPCHECKMODSPECGLOBALS,
1349 "assume checkmod qualifier for unqualified global declarations in .lcl files",
1353 FK_GLOBALS, FK_UNSPEC, modeFlag,
1354 "impcheckedstrictspecglobs",
1355 FLG_IMPCHECKEDSTRICTSPECGLOBALS,
1356 "assume checkmod qualifier for unqualified global declarations in .lcl files",
1360 FK_GLOBALS, FK_UNSPEC, modeFlag,
1362 FLG_IMPCHECKEDGLOBALS,
1363 "assume checked qualifier for unqualified global declarations",
1367 FK_GLOBALS, FK_UNSPEC, modeFlag,
1369 FLG_IMPCHECKMODGLOBALS,
1370 "assume checkmod qualifier for unqualified global declarations",
1374 FK_GLOBALS, FK_UNSPEC, modeFlag,
1375 "impcheckedstrictglobs",
1376 FLG_IMPCHECKEDSTRICTGLOBALS,
1377 "assume checkedstrict qualifier for unqualified global declarations",
1381 FK_GLOBALS, FK_UNSPEC, modeFlag,
1382 "impcheckedstatics",
1383 FLG_IMPCHECKEDSTATICS,
1384 "assume checked qualifier for unqualified file static declarations",
1388 FK_GLOBALS, FK_UNSPEC, modeFlag,
1389 "impcheckmodstatics",
1390 FLG_IMPCHECKMODSTATICS,
1391 "assume checkmod qualifier for unqualified file static declarations",
1395 FK_GLOBALS, FK_UNSPEC, modeFlag,
1396 "impcheckmodinternals",
1397 FLG_IMPCHECKMODINTERNALS,
1398 "assume checkmod qualifier for unqualified local "
1399 "static declarations (for internal state modifications)",
1403 FK_GLOBALS, FK_UNSPEC, modeFlag,
1404 "impcheckedstrictstatics",
1405 FLG_IMPCHECKEDSTRICTSTATICS,
1406 "assume checkedstrict qualifier for unqualified file static declarations",
1410 FK_GLOBALS, FK_MODIFIES, modeFlag,
1413 "undocumented modification of a checked global variable",
1414 "A checked global variable is modified by the function, but not listed in "
1415 "its modifies clause.",
1419 FK_GLOBALS, FK_MODIFIES, modeFlag,
1422 "undocumented modification of a checked global variable in a function "
1423 "declared with no modifies clause",
1424 "A checked global variable is modified by the function, but not listed in "
1425 "its modifies clause.",
1429 FK_GLOBALS, FK_MODIFIES, modeFlag,
1430 "modstrictglobsnomods",
1431 FLG_MODSTRICTGLOBSUNSPEC,
1432 "undocumented modification of a strict checked global variable in a "
1433 "function declared with no modifies clause",
1434 "A checked global variable is modified by the function, but not listed in "
1435 "its modifies clause.",
1439 FK_GLOBALS, FK_MODIFIES, modeFlag,
1440 "modglobsunchecked",
1441 FLG_MODGLOBSUNCHECKED,
1442 "undocumented modification of an unchecked checked global variable",
1443 "An unchecked global variable is modified by the function, but not listed in "
1444 "its modifies clause.",
1459 FK_CONTROL, FK_NONE, modeFlag,
1462 "path with no return detected in non-void function",
1463 "There is a path through a function declared to return a value on "
1464 "which there is no return statement. This means the execution "
1465 "may fall through without returning a meaningful result to "
1470 FK_CONTROL, FK_NONE, plainFlag,
1473 "empty return in function declared to return value",
1478 FK_CONTROL, FK_NONE, plainFlag,
1481 "loop predicate always exits",
1487 FK_CONTROL, FK_MEMORY, specialFlag,
1490 "assume all loops execute at least once (sets forloopexec, whileloopexec and iterloopexec)",
1494 FK_CONTROL, FK_MEMORY, plainFlag,
1497 "assume all for loops execute at least once",
1501 FK_CONTROL, FK_MEMORY, plainFlag,
1504 "assume all while loops execute at least once",
1508 FK_CONTROL, FK_MEMORY, plainFlag,
1511 "assume all iterator loops execute at least once",
1515 FK_CONTROL, FK_MEMORY, plainFlag,
1517 FLG_OBVIOUSLOOPEXEC,
1518 "assume loop that can be determined to always execute always does",
1522 /* 8.2 Undefined Behavior */
1525 FK_BEHAVIOR, FK_ANSI, modeFlag,
1528 "code has unspecified or implementation-dependent behavior "
1529 "because of order of evaluation",
1530 "Code has unspecified behavior. "
1531 "Order of evaluation of function parameters or subexpressions "
1532 "is not defined, so if a value is used and modified in different "
1533 "places not separated by a sequence point constraining "
1534 "evaluation order, then the result of the expression is "
1539 FK_BEHAVIOR, FK_ANSI, modeFlag,
1542 "code involving call to unspecified function has undefined or implementation-dependent behavior",
1543 "Code involving a call to function with no modifies or globals clause "
1544 "may have undefined or implementation-dependent behavior (Splint assumes the "
1545 "unconstrained call may modify any reachable state or use any global). Add a "
1546 "specification for the function.",
1550 /* 8.3 Problematic Control Structures */
1552 /* 8.3.1 Infinite Loops */
1555 FK_CONTROL, FK_NONE, modeFlag,
1558 "likely infinite loop is detected",
1559 "This appears to be an infinite loop. Nothing in the body of the "
1560 "loop or the loop test modifies the value of the loop test. "
1561 "Perhaps the specification of a function called in the loop "
1562 "body is missing a modification.",
1566 FK_CONTROL, FK_NONE, modeFlag,
1569 "likely infinite loop is detected (may result from unconstrained function)",
1570 "This appears to be an infinite loop. Nothing in the body of the "
1571 "loop or the loop test modifies the value of the loop test. "
1572 "There may be a modification through a call to an unconstrained "
1573 "function, or an unconstrained function in the loop test may use "
1574 "a global variable modified by the loop body.",
1578 /* 8.3.2 Switches */
1581 FK_CONTROL, FK_NONE, modeFlag,
1584 "non-empty case in a switch without preceding break",
1585 "Execution falls through from the previous case.", 0, 0
1588 FK_CONTROL, FK_NONE, modeFlag,
1591 "switch on enum type missing case for some value",
1592 "Not all values in an enumeration are present as cases in the switch.",
1596 FK_CONTROL, FK_NONE, modeFlag,
1599 "first statement in switch is not a case",
1600 "The first statement after a switch is not a case.",
1604 FK_CONTROL, FK_NONE, plainFlag,
1607 "duplicate cases in switch",
1608 "Duplicate cases in switch.",
1612 /* 8.3.3 Deep Breaks */
1615 FK_CONTROL, FK_NONE, specialFlag,
1618 "break inside nested while or for or switch",
1619 "A break statement appears inside the body of a nested while, for or "
1620 "switch statement. Sets looploopbreak, loopswitchbreak, "
1621 "switchloopbreak, switchswitchbreak, and looploopcontinue.",
1625 FK_CONTROL, FK_NONE, modeFlag,
1628 "break inside nested while or for",
1629 "A break statement appears inside the body of a nested while or for "
1630 "statement. This is perfectly reasonable code, but check that "
1631 "the break is intended to break only the inner loop. The "
1632 "break statement may be preceded by /*@innerbreak@*/ to suppress "
1633 "the message for this break only.",
1637 FK_CONTROL, FK_NONE, modeFlag,
1639 FLG_SWITCHLOOPBREAK,
1640 "break in loop inside switch",
1641 "A break statement appears inside the body of a while or for "
1642 "statement within a switch. This is perfectly reasonable code, but check that "
1643 "the break is intended to break only the inner loop. The "
1644 "break statement may be preceded by /*@loopbreak@*/ to suppress "
1645 "the message for this break only.",
1649 FK_CONTROL, FK_NONE, modeFlag,
1651 FLG_LOOPSWITCHBREAK,
1652 "break in switch inside loop",
1653 "A break statement appears inside a switch statement within a while or "
1654 "for loop. This is perfectly reasonable code, but check that "
1655 "the break is intended to break only the inner loop. The "
1656 "break statement may be preceded by /*@switchbreak@*/ to suppress "
1657 "the message for this break only.",
1661 FK_CONTROL, FK_NONE, modeFlag,
1662 "switchswitchbreak",
1663 FLG_SWITCHSWITCHBREAK,
1664 "break in switch inside switch",
1665 "A break statement appears inside a switch statement within another "
1666 "switch statement. This is perfectly reasonable code, but check that "
1667 "the break is intended to break only the inner switch. The "
1668 "break statement may be preceded by /*@innerbreak@*/ to suppress "
1669 "the message for this break only.",
1673 FK_CONTROL, FK_NONE, modeFlag,
1675 FLG_LOOPLOOPCONTINUE,
1676 "continue inside nested loop",
1677 "A continue statement appears inside a loop within a loop. "
1678 "This is perfectly reasonable code, but check that "
1679 "the continue is intended to continue only the inner loop. The "
1680 "continue statement may be preceded by /*@innercontinue@*/ to suppress "
1681 "the message for this continue only.",
1685 /* 8.3.4 Loop and If Bodies */
1688 FK_CONTROL, FK_NONE, modeFlag,
1691 "a while statement has no body",
1692 "While statement has no body.",
1696 FK_CONTROL, FK_NONE, modeFlag,
1699 "the body of a while statement is not a block",
1700 "While body is a single statement, not a compound block.",
1704 FK_CONTROL, FK_NONE, modeFlag,
1707 "a for statement has no body",
1708 "For statement has no body.",
1712 FK_CONTROL, FK_NONE, modeFlag,
1715 "the body of a for statement is not a block",
1716 "Loop body is a single statement, not a compound block.",
1720 FK_CONTROL, FK_NONE, modeFlag,
1723 "an if statement has no body",
1724 "If statement has no body.",
1728 FK_CONTROL, FK_NONE, modeFlag,
1731 "the body of an if statement is not a block",
1732 "If body is a single statement, not a compound block.",
1736 FK_CONTROL, FK_NONE, specialFlag,
1739 "an if, while or for statement has no body (sets ifempty, "
1740 "whileempty and forempty",
1745 FK_CONTROL, FK_NONE, specialFlag,
1748 "the body of an if, while or for statement is not a block "
1749 "(sets ifblock, whileblock and forblock)",
1750 "Body is a single statement, not a compound block.",
1754 /* 8.3.5 Complete Logic */
1757 FK_CONTROL, FK_NONE, modeFlag,
1760 "if ... else if chains must have final else",
1761 "There is no final else following an else if construct.",
1765 /* 8.4 Suspicious Statements */
1768 FK_CONTROL, FK_NONE, modeFlag,
1771 "unreachable code detected",
1772 "This code will never be reached on any possible execution.",
1776 /* 8.4.1 Statements with No Effects */
1779 FK_EFFECT, FK_CONTROL, modeFlag,
1782 "statement with no effect",
1783 "Statement has no visible effect --- no values are modified.",
1787 FK_EFFECT, FK_CONTROL, modeFlag,
1790 "statement with no effect (except possibly through call to "
1791 "unconstrained function)",
1792 "Statement has no visible effect --- no values are modified. It may "
1793 "modify something through a call to an unconstrained function.",
1797 /* 8.4.2 Ignored Return Values */
1800 FK_IGNORERET, FK_NONE, specialFlag,
1803 "return value ignored (sets retvalint, retvalbool and retvalother)",
1804 "Result returned by function call is not used. If this is intended, "
1805 "cast result to (void) to eliminate message.",
1809 FK_IGNORERET, FK_BOOL, modeFlag,
1812 "return value of type other than bool or int ignored",
1813 "Result returned by function call is not used. If this is intended, "
1814 "can cast result to (void) to eliminate message.",
1818 FK_IGNORERET, FK_BOOL, modeFlag,
1821 "return value of manifest type bool ignored",
1822 "Result returned by function call is not used. If this is intended, "
1823 "can cast result to (void) to eliminate message.",
1827 FK_IGNORERET, FK_NONE, modeFlag,
1830 "return value of type int ignored",
1831 "Result returned by function call is not used. If this is intended, "
1832 "can cast result to (void) to eliminate message.",
1841 FK_BOUNDS, FK_MEMORY, modeFlag,
1844 "misuse of nullterminated allocation",
1845 "A possibly non-nullterminated string/memory is used/referenced as a nullterminated one.",
1849 FK_BOUNDS, FK_MEMORY, specialFlag,
1852 "memory bounds checking (sets boundsread and boundswrite)",
1853 "Memory read or write may be out of bounds of allocated storage.", 0, 0
1856 FK_BOUNDS, FK_MEMORY, plainFlag,
1859 "possible out of bounds read",
1860 "A memory read references memory beyond the allocated storage.",
1864 FK_BOUNDS, FK_MEMORY, plainFlag,
1867 "possible buffer overflow from an out of bounds write",
1868 "A memory write may write to an address beyond the allocated buffer.",
1873 FK_BOUNDS, FK_DISPLAY, plainFlag,
1876 "display function post conditions",
1877 "Display function post conditions.",
1881 FK_BOUNDS, FK_DISPLAY, plainFlag,
1882 "redundantconstraints",
1883 FLG_REDUNDANTCONSTRAINTS,
1884 "display seemingly redundant constraints",
1885 "Display seemingly redundant constraints",
1888 /*drl7x added 6/18/01 */
1890 FK_BOUNDS, FK_MEMORY, modeFlag,
1893 "unable to verify predicate in ensures clause",
1894 "The function implementation may not satisfy a post condition given in an ensures clause.",
1899 FK_BOUNDS, FK_MEMORY, plainFlag,
1900 "implictconstraint",
1901 FLG_IMPLICTCONSTRAINT,
1902 "generate implicit constraints for functions",
1906 /*drl7x added 4/29/01 */
1908 FK_BOUNDS, FK_MEMORY, plainFlag,
1911 "use limited OR expressions to resolve constraints",
1917 FK_BOUNDS, FK_MEMORY, plainFlag,
1919 FLG_NULLTERMINATEDWARNING,
1920 "misuse of nullterminated allocation",
1921 "A user annotated non-nullterminated buffer is used/referenced as a nullterminated one.",
1926 FK_BOUNDS, FK_DISPLAY, plainFlag,
1927 "showconstraintparens",
1928 FLG_PARENCONSTRAINT,
1929 "display parentheses around constraint terms",
1933 /*drl added 2/4/2002*/
1935 FK_BOUNDS, FK_DISPLAY, plainFlag,
1936 "boundscompacterrormessages",
1937 FLG_BOUNDSCOMPACTERRORMESSAGES,
1938 "Display fewer new lines in bounds checking error messages",
1943 FK_BOUNDS, FK_DISPLAY, plainFlag,
1944 "showconstraintlocation",
1945 FLG_CONSTRAINTLOCATION,
1946 "display location for every constraint generated",
1949 }, /*drl added flag 4/26/01*/
1952 ** 10. Extensible Checking
1956 FK_EXTENSIBLE, FK_FILES, globalStringFlag, ARG_FILE,
1959 "load meta state declaration and corresponding xh file",
1963 FK_EXTENSIBLE, FK_MEMORY, modeFlag,
1966 "storage has been transfered with invalid state",
1967 "Transfer violates user-defined state rules.",
1971 FK_EXTENSIBLE, FK_MEMORY, modeFlag,
1974 "control paths merge with storage in incompatible states",
1975 "Control path merge violates user-defined state merge rules.",
1984 FK_MACROS, FK_NONE, modeFlag,
1988 "A macro is defined in more than one place.", 0, 0
1991 FK_MACROS, FK_UNRECOG, modeFlag,
1994 "unrecognized identifier in macro",
1995 "An unrecognized identifier appears in a macro. If the identifier "
1996 "is defined before the macro is used, then this is okay.",
2000 /* 11.1 Constant Macros */
2003 FK_MACROS, FK_PROTOS, modeFlag,
2006 "non-parameterized macro without prototype or specification",
2007 "Macro constant has no declaration. Use /*@constant ...@*/ to "
2008 "declare the macro.",
2012 /* 11.2 Function-like Macros */
2015 FK_MACROS, FK_NONE, modeFlag,
2018 "macro definition is syntactically not equivalent to function",
2019 "A macro is defined in a way that may cause syntactic problems. "
2020 "If the macro returns a value, use commas to separate expressions; "
2021 "otherwise, use do { <macro body> } while (FALSE) construct.",
2025 FK_MACROS, FK_NONE, modeFlag,
2028 "macro definition for is empty",
2029 "A macro definition has no body.",
2033 FK_MACROS, FK_PARAMS, modeFlag,
2036 "macro parameter not used exactly once",
2037 "A macro parameter is not used exactly once in all possible "
2038 "invocations of the macro. To behave like a function, "
2039 "each macro parameter must be used exactly once on all "
2040 "invocations of the macro so that parameters with "
2041 "side-effects are evaluated exactly once. Use /*@sef@*/ to "
2042 "denote parameters that must be side-effect free.",
2046 FK_MACROS, FK_CONTROL, modeFlag,
2049 "return statement in macro body",
2050 "The body of a macro declared as a function uses a return statement. "
2051 "This exhibits behavior that "
2052 "could not be implemented by a function.",
2056 FK_MACROS, FK_PARAMS, modeFlag,
2059 "assignment to a macro parameter",
2060 "A macro parameter is used as the left side of an "
2061 "assignment expression. This exhibits behavior that "
2062 "could not be implemented by a function.",
2066 FK_MACROS, FK_NONE, modeFlag,
2069 "macro parameter used without parentheses (in potentially dangerous context)",
2070 "A macro parameter is used without parentheses. This could be "
2071 "dangerous if the macro is invoked with a complex expression "
2072 "and precedence rules will change the evaluation inside the macro.",
2076 FK_MACROS, FK_PROTOS, modeFlag,
2079 "macro without prototype or specification (sets macrofcndecl and macroconstdecl)",
2080 "Argument checking cannot be done well for macros without prototypes "
2081 "or specifications, since the types of the arguments are unknown.",
2085 FK_MACROS, FK_PROTOS, modeFlag,
2088 "parameterized macro without prototype or specification",
2089 "Function macro has no declaration.",
2093 /* 11.2.1 Side Effect Free Parameters */
2096 FK_MACROS, FK_PARAMS, modeFlag,
2099 "a parameter with side-effects is passed as a sef parameter",
2100 "An actual parameter corresponding to a sef parameter may have a side-effect.",
2104 FK_MACROS, FK_PARAMS, modeFlag,
2107 "a parameter with unconstrained side-effects is passed as a sef parameter",
2108 "An actual parameter corresponding to a sef parameter involves a call "
2109 "to a procedure with no modifies clause that may have a side-effect.",
2113 /* 11.3 Controlling Macro Checking */
2116 FK_MACROS, FK_NONE, plainFlag,
2119 "check all macros without parameter lists as constants",
2120 "Every non-parameterized macro (not preceded by /*@notfunction@*/) "
2121 "is checked as a constant.",
2125 FK_MACROS, FK_NONE, plainFlag,
2128 "check all macros with parameter lists as functions",
2129 "Every parameterized macro (not preceded by /*@notfunction@*/) "
2130 "is checked as a function.",
2134 FK_MACROS, FK_NONE, plainSpecialFlag,
2137 "sets fcnmacros and constmacros",
2138 "All macros (not preceded by /*@notfunction@*/) are checked as functions or "
2139 "constants depending on whether or not they have parameter lists.",
2143 FK_MACROS, FK_NONE, plainFlag,
2146 "check all macros with declarations in library as functions",
2147 "Every macro declared in the load library is checked.",
2151 FK_MACROS, FK_NONE, plainFlag,
2154 "check all macros corresponding to specified functions or constants",
2155 "Every macro declared a specification file is checked.",
2159 FK_MACROS, FK_NONE, modeFlag,
2162 "macro definition does not match iter or constant declaration",
2163 "A iter or constant macro is defined using a different name from the "
2164 "one used in the previous syntactic comment",
2168 FK_MACROS, FK_NONE, plainFlag,
2171 "the line after a constant or iter declaration must be a macro definition",
2172 "A constant or iter declaration is not immediately followed by a macro definition.",
2176 /* 11.4 Iterators */
2179 FK_ITER, FK_NONE, plainFlag,
2182 "iter is not balanced with end_<iter>",
2187 FK_ITER, FK_NONE, plainFlag,
2190 "iter yield parameter is inappropriate",
2195 FK_ITER, FK_NONE, plainFlag,
2198 "iter declaration has no yield parameters",
2199 "An iterator has been declared with no parameters annotated with "
2200 "yield. This may be what you want, if the iterator is meant "
2201 "to do something a fixed number of times, but returns no "
2202 "information to the calling context. Probably, a parameter "
2203 "is missing the yield annotation to indicate that it is "
2204 "assigned a value in the calling context.",
2209 ** 12. Naming Conventions
2213 FK_NAMES, FK_ABSTRACT, plainFlag,
2216 "controls name checking without changing other settings",
2220 /* 12.1.1 Czech Names */
2223 FK_NAMES, FK_ABSTRACT, specialFlag,
2226 "czech naming convention (sets accessczech, czechfunctions, czechvars, "
2227 "czechconstants, czechenums, and czechmacros)",
2228 "Name is not consistent with Czech naming convention.", 0, 0
2231 FK_NAMES, FK_ABSTRACT, plainFlag,
2234 "czech naming convention violated in a function or iterator declaration",
2235 "Function or iterator name is not consistent with Czech naming convention.", 0, 0
2238 FK_NAMES, FK_ABSTRACT, plainFlag,
2241 "czech naming convention violated in a variable declaration",
2242 "Variable name is not consistent with Czech naming convention.", 0, 0
2245 FK_NAMES, FK_ABSTRACT, plainFlag,
2248 "czech naming convention violated in an expanded macro name",
2249 "Expanded macro name is not consistent with Czech naming convention.", 0, 0
2252 FK_NAMES, FK_ABSTRACT, plainFlag,
2255 "czech naming convention violated in a constant declaration",
2256 "Constant name is not consistent with Czech naming convention.", 0, 0
2259 FK_NAMES, FK_ABSTRACT, plainFlag,
2262 "czech naming convention violated in a user-defined type definition",
2263 "Type name is not consistent with Czech naming convention. Czech type "
2264 "names must not use the underscore character.", 0, 0
2267 /* 12.1.2 Slovak Names */
2270 FK_NAMES, FK_ABSTRACT, specialFlag,
2273 "slovak naming convention violated",
2274 "Name is not consistent with Slovak naming convention.", 0, 0
2277 FK_NAMES, FK_ABSTRACT, plainFlag,
2279 FLG_SLOVAKFUNCTIONS,
2280 "slovak naming convention violated in a function or iterator declaration",
2281 "Function or iterator name is not consistent with Slovak naming convention.", 0, 0
2284 FK_NAMES, FK_ABSTRACT, plainFlag,
2287 "slovak naming convention violated in an expanded macro name",
2288 "Expanded macro name is not consistent with Slovak naming convention.", 0, 0
2291 FK_NAMES, FK_ABSTRACT, plainFlag,
2294 "slovak naming convention violated in a variable declaration",
2295 "Variable name is not consistent with Slovak naming convention.", 0, 0
2298 FK_NAMES, FK_ABSTRACT, plainFlag,
2300 FLG_SLOVAKCONSTANTS,
2301 "slovak naming convention violated in a constant declaration",
2302 "Constant name is not consistent with Slovak naming convention.", 0, 0
2305 FK_NAMES, FK_ABSTRACT, plainFlag,
2308 "slovak naming convention violated in a use-defined type definition",
2309 "Type name is not consistent with Slovak naming convention. Slovak type "
2310 "names may not include uppercase letters.", 0, 0
2313 /* 12.1.3 Czechoslovak Names */
2315 FK_NAMES, FK_ABSTRACT, specialFlag,
2318 "czech or slovak naming convention violated",
2319 "Name is not consistent with either Czech or Slovak naming convention.", 0, 0
2322 FK_NAMES, FK_ABSTRACT, plainFlag,
2324 FLG_CZECHOSLOVAKFUNCTIONS,
2325 "czechoslovak naming convention violated in a function or iterator declaration",
2326 "Function name is not consistent with Czechoslovak naming convention.", 0, 0
2329 FK_NAMES, FK_ABSTRACT, plainFlag,
2330 "czechoslovakmacros",
2331 FLG_CZECHOSLOVAKMACROS,
2332 "czechoslovak naming convention violated in an expanded macro name",
2333 "Expanded macro name is not consistent with Czechoslovak naming convention.", 0, 0
2336 FK_NAMES, FK_ABSTRACT, plainFlag,
2338 FLG_CZECHOSLOVAKVARS,
2339 "czechoslovak naming convention violated in a variable declaration",
2340 "Variable name is not consistent with Czechoslovak naming convention.", 0, 0
2343 FK_NAMES, FK_ABSTRACT, plainFlag,
2344 "czechoslovakconsts",
2345 FLG_CZECHOSLOVAKCONSTANTS,
2346 "czechoslovak naming convention violated in a constant declaration",
2347 "Constant name is not consistent with Czechoslovak naming convention.", 0, 0
2350 FK_NAMES, FK_ABSTRACT, plainFlag,
2351 "czechoslovaktypes",
2352 FLG_CZECHOSLOVAKTYPES,
2353 "czechoslovak naming convention violated in a user-defined type definition",
2354 "Type name is not consistent with Czechoslovak naming convention. Czechoslovak "
2355 "type names may not include uppercase letters or the underscore character.", 0, 0
2358 /* 12.2 Namespace Prefixes */
2361 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2364 "set namespace prefix for variables declared in a macro body",
2365 "A variable declared in a macro body does not start with the macrovarprefix.",
2369 FK_NAMES, FK_PREFIX, plainFlag,
2370 "macrovarprefixexclude",
2371 FLG_MACROVARPREFIXEXCLUDE,
2372 "the macrovarprefix may not be used for non-macro variables",
2373 "A variable declared outside a macro body starts with the macrovarprefix.",
2377 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2380 "set namespace prefix for struct, union and enum tags",
2381 "A tag identifier does not start with the tagprefix.",
2385 FK_NAMES, FK_PREFIX, plainFlag,
2387 FLG_TAGPREFIXEXCLUDE,
2388 "the tagprefix may not be used for non-tag identifiers",
2389 "An identifier that is not a tag starts with the tagprefix.",
2393 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2396 "set namespace prefix for enum members",
2397 "An enum member does not start with the enumprefix.",
2401 FK_NAMES, FK_PREFIX, plainFlag,
2402 "enumprefixexclude",
2403 FLG_ENUMPREFIXEXCLUDE,
2404 "the enumprefix may not be used for non-enum member identifiers",
2405 "An identifier that is not an enum member starts with the enumprefix.",
2409 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2411 FLG_FILESTATICPREFIX,
2412 "set namespace prefix for file static declarations",
2413 "A file-static identifier does not start with the filestaticprefix.",
2417 FK_NAMES, FK_PREFIX, plainFlag,
2418 "filestaticprefixexclude",
2419 FLG_FILESTATICPREFIXEXCLUDE,
2420 "the filestaticprefix may not be used for identifiers that are not file static",
2421 "An identifier that is not file static starts with the filestaticprefix.",
2425 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2428 "set namespace prefix for global variables",
2429 "A global variable does not start with the globalprefix",
2433 FK_NAMES, FK_PREFIX, plainFlag,
2434 "globalprefixexclude",
2435 FLG_GLOBPREFIXEXCLUDE,
2436 "the globalprefix may not be used for non-global identifiers",
2437 "An identifier that is not a global variable starts with the globalprefix.",
2441 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2444 "set namespace prefix for user-defined types",
2445 "A user-defined type does not start with the typeprefix",
2449 FK_NAMES, FK_PREFIX, plainFlag,
2450 "typeprefixexclude",
2451 FLG_TYPEPREFIXEXCLUDE,
2452 "the typeprefix may not be used for identifiers that are not type names",
2453 "An identifier that is not a type name starts with the typeprefix.",
2457 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2460 "set namespace prefix for external identifiers",
2461 "An external identifier does not start with the externalprefix",
2465 FK_NAMES, FK_PREFIX, plainFlag,
2466 "externalprefixexclude",
2467 FLG_EXTERNALPREFIXEXCLUDE,
2468 "the externalprefix may not be used for non-external identifiers",
2469 "An identifier that is not external starts with the externalprefix.",
2473 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2476 "set namespace prefix for local variables",
2477 "A local variable does not start with the localprefix",
2481 FK_NAMES, FK_PREFIX, plainFlag,
2482 "localprefixexclude",
2483 FLG_LOCALPREFIXEXCLUDE,
2484 "the localprefix may not be used for non-local identifiers",
2485 "An identifier that is not a local variable starts with the localprefix.",
2489 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2490 "uncheckedmacroprefix",
2491 FLG_UNCHECKEDMACROPREFIX,
2492 "set namespace prefix for unchecked macros",
2493 "An unchecked macro name does not start with the uncheckedmacroprefix",
2497 FK_NAMES, FK_PREFIX, plainFlag,
2498 "uncheckedmacroprefixexclude",
2499 FLG_UNCHECKEDMACROPREFIXEXCLUDE,
2500 "the uncheckmacroprefix may not be used for identifiers that are not "
2502 "An identifier that is not the name of an unchecked macro "
2503 "starts with the uncheckedmacroprefix.",
2507 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2510 "set namespace prefix for constants",
2511 "A constant does not start with the constantprefix",
2515 FK_NAMES, FK_PREFIX, plainFlag,
2516 "constprefixexclude",
2517 FLG_CONSTPREFIXEXCLUDE,
2518 "the constprefix may not be used for non-constant identifiers",
2519 "An identifier that is not a constant starts with the constantprefix.",
2523 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2526 "set namespace prefix for iterators",
2527 "An iter does not start with the iterator prefix",
2531 FK_NAMES, FK_PREFIX, plainFlag,
2532 "iterprefixexclude",
2533 FLG_ITERPREFIXEXCLUDE,
2534 "the iterprefix may not be used for non-iter identifiers",
2535 "An identifier that is not a iter starts with the iterprefix.",
2539 FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2541 FLG_DECLPARAMPREFIX,
2542 "set namespace prefix for parameters in function prototype declarations",
2543 "A parameter name in a function prototype declaration does not start with the "
2544 "declaration parameter prefix",
2548 /* 12.3 Naming Restrictions */
2550 FK_NAMES, FK_ANSI, modeFlag,
2553 "external name conflicts with name reserved for system or standard library",
2554 "External name is reserved for system use by ISO C99 standard.",
2558 FK_NAMES, FK_ANSI, modeFlag,
2561 "external or internal name is a C++ keyword or reserved word",
2562 "External name is a C++ keyword or reserved word. "
2563 "This could lead to problems if the "
2564 "code is compiled with a C++ compiler.",
2568 FK_NAMES, FK_ANSI, modeFlag,
2569 "isoreservedinternal",
2570 FLG_ISORESERVEDLOCAL,
2571 "internal name conflicts with name reserved for system or standard library",
2572 "Internal name is reserved for system in ISO C99 standard (this should not be necessary unless you are worried about C library implementations that violate the standard and use macros).",
2576 FK_NAMES, FK_ANSI, plainFlag,
2577 "distinctexternalnames",
2578 FLG_DISTINCTEXTERNALNAMES,
2579 "external name is not distinguishable from another external name using "
2580 "the number of significant characters",
2581 "An external name is not distinguishable from another external name "
2582 "using the number of significant characters. According to "
2583 "ANSI Standard (3.1), an implementation may only consider the first 6 "
2584 "characters significant, and ignore alphabetical case "
2585 "distinctions (ISO C99 requires 31). The "
2586 "+externalnamelen <n> flag may be used to change the number "
2587 "of significant characters, and -externalnamecaseinsensitive to make "
2588 "alphabetical case significant in external names.",
2592 FK_NAMES, FK_ANSI, specialValueFlag,
2594 FLG_EXTERNALNAMELEN,
2595 "set the number of significant characters in an external name",
2596 "Sets the number of significant characters in an external name (default is 6 for old "
2597 "ANSI89 limit, C99 requires 31). "
2598 "Sets +distinctexternalnames.",
2602 FK_NAMES, FK_ANSI, plainSpecialFlag,
2603 "externalnamecaseinsensitive",
2604 FLG_EXTERNALNAMECASEINSENSITIVE,
2605 "alphabetic comparisons for external names are case-insensitive",
2606 "Make alphabetic case insignificant in external names. By ANSI89 "
2607 "standard, case need not be significant in an external name. "
2608 "If +distinctexternalnames is not set, sets "
2609 "+distinctexternalnames with unlimited external name length.",
2613 FK_NAMES, FK_ANSI, plainFlag,
2614 "distinctinternalnames",
2615 FLG_DISTINCTINTERNALNAMES,
2616 "internal name is not distinguishable from another internal name using "
2617 "the number of significant characters",
2618 "An internal name is not distinguishable from another internal name "
2619 "using the number of significant characters. According to "
2620 "ANSI89 Standard (3.1), an implementation may only consider the first 31 "
2621 "characters significant (ISO C99 specified 63). The "
2622 "+internalnamelen <n> flag changes the number "
2623 "of significant characters, -internalnamecaseinsensitive to makes "
2624 "alphabetical case significant, and "
2625 "+internalnamelookalike to make similar-looking characters "
2630 FK_NAMES, FK_ANSI, specialValueFlag,
2632 FLG_INTERNALNAMELEN,
2633 "set the number of significant characters in an internal name",
2634 "Sets the number of significant characters in an internal name (ANSI89 "
2635 "default is 31.) Sets +distinctinternalnames.",
2639 FK_NAMES, FK_ANSI, plainSpecialFlag,
2640 "internalnamecaseinsensitive",
2641 FLG_INTERNALNAMECASEINSENSITIVE,
2642 "set whether case is significant an internal names "
2643 "(-internalnamecaseinsensitive means case is significant)" ,
2644 "Set whether case is significant an internal names "
2645 "(-internalnamecaseinsensitive "
2646 "means case is significant). By ANSI89 default, case is not "
2647 "significant. If +distinctinternalnames is not set, sets "
2648 "+distinctinternalnames with unlimited internal name length.",
2652 FK_NAMES, FK_ANSI, plainSpecialFlag,
2653 "internalnamelookalike",
2654 FLG_INTERNALNAMELOOKALIKE,
2655 "lookalike characters match in internal names",
2656 "Set whether similar looking characters (e.g., \"1\" and \"l\") "
2657 "match in internal names.",
2661 FK_NAMES, FK_PREFIX, modeFlag,
2664 "a parameter in a function prototype has a name",
2665 "A parameter in a function prototype has a name. This is dangerous, "
2666 "since a macro definition could be visible here.",
2670 FK_NAMES, FK_PREFIX, modeFlag,
2673 "the name of a parameter in a function prototype and corresponding "
2674 "declaration must match (after removing the protoparamprefix",
2675 "A parameter in a function definition does not have the same name as "
2676 "the corresponding in the declaration of the function after "
2677 "removing the protoparamprefix",
2681 FK_NAMES, FK_PREFIX, plainFlag,
2682 "protoparamprefixexclude",
2683 FLG_DECLPARAMPREFIXEXCLUDE,
2684 "the protoparamprefix may not be used for non-declaraction parameter identifiers",
2685 "An identifier that is not a parameter name in a function prototype "
2686 "starts with the protoparamprefix.",
2694 /* 13.1 Unused Declarations */
2697 FK_USE, FK_COMPLETE, modeFlag,
2700 "declaration at top level not used",
2701 "An external declaration not used in any source file.", 0, 0
2704 FK_USE, FK_EXPORT, modeFlag,
2707 "a declaration is exported but not used outside this module",
2708 "A declaration is exported, but not used outside this module. "
2709 "Declaration can use static qualifier.",
2713 FK_USE, FK_EXPORT, modeFlag,
2716 "a declaration is exported but does not appear in a header file",
2717 "A declaration is exported, but does not appear in a header file.",
2721 FK_USE, FK_EXPORT, modeFlag,
2723 FLG_EXPORTHEADERVAR,
2724 "a variable declaration is exported but does not appear in a header file",
2725 "A variable declaration is exported, but does not appear in a header "
2726 "file. (Used with exportheader.)",
2730 FK_USE, FK_NONE, modeFlag,
2733 "field of structure type not used",
2734 "A field is present in a structure type but never used. Use /*@unused@*/ in front of field declaration to suppress message.",
2738 FK_USE, FK_NONE, modeFlag,
2741 "member of an enum type not used",
2742 "A member of an enum type is never used.",
2746 FK_USE, FK_NONE, modeFlag,
2749 "constant declared but not used",
2750 "A constant is declared but not used. Use unused in the constant declaration to suppress message.",
2754 FK_USE, FK_NONE, modeFlag,
2757 "function declared but not used",
2758 "A function is declared but not used. Use /*@unused@*/ in front of function header to suppress message.",
2762 FK_USE, FK_PARAMS, modeFlag,
2765 "function parameter not used ",
2766 "A function parameter is not used in the body of the function. If the argument is needed for type compatibility or future plans, use /*@unused@*/ in the argument declaration.",
2770 FK_USE, FK_TYPE, modeFlag,
2773 "type declared but not used",
2774 "A type is declared but not used. Use /*@unused@*/ in front of typedef to suppress messages.",
2778 FK_USE, FK_NONE, modeFlag,
2781 "variable declared but not used",
2782 "A variable is declared but never used. Use /*@unused@*/ in front "
2783 "of declaration to suppress message.",
2787 FK_USE, FK_COMPLETE, modeFlag,
2790 "unused declaration in special file (corresponding to .l or .y file)",
2794 /* 13.2 Complete Programs */
2797 FK_COMPLETE, FK_NONE, modeFlag,
2800 "function or variable declared but never defined",
2801 "A function or variable is declared, but not defined in any source code file.",
2805 FK_COMPLETE, FK_SPEC, modeFlag,
2808 "function or variable specified but never defined",
2809 "A function or variable is declared in an .lcl file, but not defined in any source code file.",
2813 FK_COMPLETE, FK_SPEC, plainFlag,
2816 "function or variable specified but never declared in a source file",
2817 "A function or variable is declared in an .lcl file, but not declared "
2818 "in any source code file.",
2822 FK_DECL, FK_LIBS, plainFlag,
2825 "report new global declarations in source files",
2826 "There is a new declaration that is not declared in a loaded library "
2827 "or earlier file. (Use this flag to check for consistency "
2828 "against a library.)",
2832 FK_INIT, FK_SPEC, plainFlag,
2835 "information in specifications is not also included in syntactic comments",
2836 "There is information in the specification that is not duplicated "
2837 "in syntactic comments. Normally, this is not an "
2838 "error, but it may be useful to detect it to make "
2839 "sure checking incomplete systems without the specifications will "
2840 "still use this information.",
2845 ** 14. Libraries and Header File Inclusion
2848 /* 14.1 Standard Libraries */
2851 FK_LIBS, FK_INIT, idemGlobalFlag,
2854 "do not load standard library",
2858 FK_LIBS, FK_INIT, idemGlobalFlag,
2861 "use normal standard library",
2862 "Library based on the ISO standard library specification is used.",
2866 FK_LIBS, FK_INIT, idemGlobalFlag,
2869 "interpret standard library strictly",
2870 "Stricter version of the standard library is used. (The default "
2871 "library is standard.lcd; strict library is strict.lcd.)",
2875 FK_LIBS, FK_INIT, idemGlobalFlag,
2878 "use UNIX (sort-of) standard library",
2879 "UNIX version of the standard library is used.",
2883 FK_LIBS, FK_INIT, idemGlobalFlag,
2886 "use strict version of UNIX (sort-of) library",
2887 "strict version of the UNIX library is used.",
2891 FK_LIBS, FK_INIT, idemGlobalFlag,
2894 "use POSIX standard library",
2895 "POSIX version of the standard library is used.",
2899 FK_LIBS, FK_INIT, idemGlobalFlag,
2902 "use strict POSIX standard library",
2903 "POSIX version of the strict standard library is used.",
2907 FK_LIBS, FK_INIT, idemGlobalFlag,
2910 "show standard library filename",
2914 FK_LIBS, FK_ANSI, plainFlag,
2917 "a POSIX header is included, but the POSIX library is not used",
2918 "Header name matches a POSIX header, but the POSIX library is not selected.",
2922 FK_LIBS, FK_ANSI, plainFlag,
2925 "warn when the unix library is used",
2926 "Unix library may not be compatible with all platforms",
2930 FK_LIBS, FK_ANSI, plainFlag,
2933 "non-standard <varargs.h> included",
2934 "Header <varargs.h> is not part of ANSI Standard. "
2935 "Should use <stdarg.h> instead.",
2939 FK_HEADERS, FK_FILES, plainFlag,
2940 "caseinsensitivefilenames",
2941 FLG_CASEINSENSITIVEFILENAMES,
2942 "file names are case insensitive (file.h and FILE.H are the same file)",
2946 /* 14.2 Generating Libraries */
2949 FK_LIBS, FK_FILES, globalStringFlag, ARG_FILE,
2952 "save state for merging (default suffix .lcd)",
2956 FK_LIBS, FK_FILES, globalStringFlag, ARG_FILE,
2959 "load state from dump file (default suffix .lcd)",
2963 /* 14.3 Header File Inclusion */
2966 FK_HEADERS, FK_SPEED, globalFlag,
2969 "optimize header inclusion to eliminate redundant includes",
2970 "When checking multiple files, each header file is processed only "
2971 "once. This may change the meaning of the code, if the "
2972 "same header file is included in different contexts (e.g., the "
2973 "header file includes #if directives and the values are "
2974 "different when it is included in different places.)",
2978 FK_HEADERS, FK_SPEED, globalFlag,
2981 "optimize header inclusion to not include any header files",
2982 "Ignore header includes. Only works if relevant information is "
2983 "loaded from a library.",
2987 FK_HEADERS, FK_SPEED, globalFlag,
2990 "do not include header files in system directories (set by -sysdirs)",
2991 "Do not include header files in system directories (set by -sysdirs)",
3005 FK_SYNTAX, FK_ANSI, plainFlag,
3008 "support some gnu (gcc) language extensions",
3009 "ANSI C does not allow some language features supported by gcc and other compilers. "
3010 "Use +gnuextensions to allow some of these extensions.", 0, 0
3016 FK_PROTOS, FK_ANSI, modeFlag,
3019 "function declaration has no parameter list",
3020 "A function declaration does not have a parameter list.",
3024 FK_PROTOS, FK_ANSI, modeFlag,
3027 "old style function definition",
3028 "Function definition is in old style syntax. Standard prototype "
3029 "syntax is preferred.",
3039 FK_SYSTEMFUNCTIONS, FK_TYPE, plainFlag,
3042 "type of main does not match expected type",
3043 "The function main does not match the expected type.",
3047 FK_SYSTEMFUNCTIONS, FK_BEHAVIOR, modeFlag,
3050 "argument to exit has implementation defined behavior",
3051 "The argument to exit should be 0, EXIT_SUCCESS or EXIT_FAILURE",
3056 FK_DECL, FK_NONE, modeFlag,
3059 "declaration reuses name visible in outer scope",
3060 "An outer declaration is shadowed by the local declaration.",
3064 FK_DECL, FK_LIBS, modeFlag,
3067 "function, variable or constant defined in a library is redefined with inconsistent type",
3068 "A function, variable or constant previously defined in a library is "
3069 "redefined with a different type.",
3073 FK_DECL, FK_LIBS, modeFlag,
3076 "library function overloaded",
3077 "A function, variable or constant defined in the library is redefined "
3078 "with a different type.",
3082 FK_DECL, FK_NONE, modeFlag,
3085 "an extern declaration is inside a function scope",
3086 "An extern declaration is used inside a function scope.",
3090 FK_DECL, FK_NONE, modeFlag,
3093 "function or variable redeclared",
3094 "A function or variable is declared in more than one place. This is "
3095 "not necessarily a problem, since the declarations are consistent.",
3099 FK_DECL, FK_NONE, plainFlag,
3102 "function or variable redefined",
3103 "A function or variable is redefined. One of the declarations should use extern.",
3107 FK_DECL, FK_TYPE, modeFlag,
3110 "variable declaration has unknown (implicitly int) type",
3111 "A variable declaration has no explicit type. The type is implicitly int.",
3116 FK_DIRECT, FK_FILES, globalStringFlag, ARG_DIRECTORY,
3119 "set directory for writing temp files",
3123 FK_DIRECT, FK_FILES, globalStringFlag, ARG_PATH,
3126 "set path for searching for library files (overrides LARCH_PATH environment variable)",
3130 FK_DIRECT, FK_FILES, globalStringFlag, ARG_DIRECTORY,
3133 "set directory to search for LCL import files (overrides LCLIMPORTDIR)",
3137 FK_DIRECT, FK_FILES, globalStringFlag, ARG_PATH,
3140 "set directories for system files (default /usr/include). Separate "
3141 "directories with path separator (colons in Unix, semi-colons in Windows). "
3142 "Flag settings propagate to files in a system directory. If "
3143 "-sysdirerrors is set, no errors are reported for files in "
3144 "system directories.",
3148 FK_DIRECT, FK_FILES, plainFlag,
3151 "prevent inclusion of header files in a system directory with "
3152 "names that match standard ANSI headers. The symbolic information "
3153 "in the standard library is used instead. Flag in effect only "
3154 "if a library including the ANSI library is loaded. The ANSI "
3155 "headers are: assert, ctype, errno, float, limits, locale, math, "
3156 "setjmp, signal, stdarg, stddef, stdio, stdlib, strings, string, "
3161 FK_DIRECT, FK_FILES, plainFlag,
3163 FLG_SKIPPOSIXHEADERS,
3164 "prevent inclusion of header files in a system directory with "
3165 "names that match standard POSIX headers. The symbolic information "
3166 "in the posix library is used instead. The POSIX headers are: "
3167 "dirent, fcntl, grp, pwd, termios, sys/stat, sys/times, "
3168 "sys/types, sys/utsname, sys/wait, unistd, and utime.",
3172 FK_DIRECT, FK_SUPPRESS, modeFlag,
3174 FLG_SYSTEMDIRERRORS,
3175 "report errors in files in system directories (set by -sysdirs)",
3179 FK_DIRECT, FK_MACROS, plainFlag,
3180 "sysdirexpandmacros",
3181 FLG_SYSTEMDIREXPAND,
3182 "expand macros in system directories regardless of other settings, "
3183 "except for macros corresponding to names defined in a load library",
3188 FK_DIRECT, FK_HEADERS, globalExtraArgFlag,
3191 "add to C include path",
3195 FK_DIRECT, FK_SPEC, globalExtraArgFlag,
3202 FK_EXPORT, FK_SPEC, specialFlag,
3205 "variable, function or type exported but not specified",
3206 "A variable, function or type is exported, but not specified.",
3210 FK_EXPORT, FK_SPEC, modeFlag,
3213 "function exported but not specified",
3214 "A function is exported, but not specified.", 0, 0
3217 FK_EXPORT, FK_SPEC, modeFlag,
3220 "expanded macro exported but not specified",
3221 "A macro is exported, but not specified.", 0, 0
3224 FK_EXPORT, FK_SPEC, modeFlag,
3227 "type definition exported but not specified",
3228 "A type is exported, but not specified.", 0, 0
3231 FK_EXPORT, FK_SPEC, modeFlag,
3234 "variable exported but not specified",
3235 "A variable is exported, but not specified.", 0, 0
3238 FK_EXPORT, FK_SPEC, modeFlag,
3241 "constant exported but not specified",
3242 "A constant is exported, but not specified.", 0, 0
3245 FK_EXPORT, FK_SPEC, modeFlag,
3248 "constant exported but not specified",
3249 "A constant is exported, but not specified.", 0, 0
3253 FK_FORMAT, FK_DISPLAY, valueFlag,
3256 "set length of messages (number of chars)",
3260 FK_FORMAT, FK_DISPLAY, valueFlag,
3263 "set number of spaces to indent sub-messages",
3267 FK_FORMAT, FK_DISPLAY, plainFlag,
3270 "show column number where error is found",
3274 FK_FORMAT, FK_DISPLAY, plainFlag,
3277 "show location information for load files",
3281 FK_FORMAT, FK_DISPLAY, plainFlag,
3283 FLG_PARENFILEFORMAT,
3284 "show column number where error is found",
3288 FK_FORMAT, FK_DISPLAY, plainFlag,
3291 "show file locations as links",
3295 FK_FORMAT, FK_NONE, plainFlag,
3298 "show name of function containing error",
3302 FK_FORMAT, FK_NONE, plainFlag,
3305 "show all possible types",
3306 "When a library function is declared with multiple possible type, the "
3307 "alternate types are shown only if +showallconjs.",
3311 FK_LIBS, FK_NONE, plainFlag,
3314 "make all alternate types implicit (useful for making system libraries",
3318 FK_GLOBAL, FK_ERRORS, globalValueFlag,
3321 "expect <int> code errors",
3325 FK_GLOBAL, FK_ERRORS, globalValueFlag,
3328 "expect <int> spec errors",
3332 FK_GLOBAL, FK_USE, idemSpecialFlag,
3335 "check as partial system (-specundef, -declundef, -exportlocal, "
3336 "don't check macros in headers without corresponding .c files)",
3341 ** Appendix D. Specifications
3345 FK_HEADERS, FK_SPEC, globalFlag,
3348 "generate .lh files", NULL,
3352 FK_HEADERS, FK_SPEC, globalFlag,
3355 "generate .lcs files", NULL,
3364 FK_HELP, FK_NONE, plainFlag,
3367 "warn when command line sets flag in abnormal way",
3368 "Command line sets flag in abnormal way",
3372 FK_HELP, FK_NONE, plainFlag,
3375 "warn when there are problems with reading the initialization files",
3376 "There was a problem reading an initialization file",
3380 FK_HELP, FK_NONE, plainFlag,
3383 "warn about bad command line flags",
3384 "A flag is not recognized or used in an incorrect way",
3388 FK_HELP, FK_NONE, plainFlag,
3391 "warn when command line file does not have a recognized extension",
3395 FK_HELP, FK_NONE, globalExtraArgFlag,
3398 "-help <flags> will describe flags",
3403 FK_INIT, FK_FILES, globalFileFlag,
3406 "read an options file (default ~/.splintrc not loaded)",
3407 "Read an options file (instead of loading default ~/.splintc)",
3411 FK_INIT, FK_FILES, globalFileFlag,
3414 "set LCL initilization file",
3418 FK_INIT, FK_FILES, globalFlag,
3421 "do not read options file",
3422 "Do not read the default options file (~/.splintrc)",
3426 FK_INIT, FK_COMMENTS, charFlag,
3429 "set marker character for syntactic comments (default is '@')",
3430 "Set the marker character for syntactic comments. Comments beginning "
3431 "with /*<char> are interpreted by Splint, where <char> is the "
3432 "comment marker character.",
3441 FK_LIMITS, FK_ANSI, modeValueFlag,
3443 FLG_CONTROLNESTDEPTH,
3444 "set maximum nesting depth of compound statements, iteration control "
3445 "structures, and selection control structures (ANSI89 minimum is 15; ISO99 is 63)",
3446 "Maximum number of control levels exceeded.",
3450 FK_LIMITS, FK_ANSI, modeValueFlag,
3452 FLG_STRINGLITERALLEN,
3453 "set maximum length of string literals (ANSI89 minimum is 509; ISO99 is 4095)",
3454 "Maximum length of string literal exceeded.",
3458 FK_LIMITS, FK_ANSI, modeValueFlag,
3460 FLG_NUMSTRUCTFIELDS,
3461 "set maximum number of fields in a struct or union (ANSI89 minimum is 127; ISO99 is 1023)",
3462 "Maximum number of fields in a struct or union exceeded.",
3466 FK_LIMITS, FK_ANSI, modeValueFlag,
3469 "set maximum number of members of an enum (ANSI89 minimum is 127; ISO99 is 1023)",
3470 "Limit on maximum number of members of an enum is exceeded.",
3474 FK_LIMITS, FK_ANSI, modeValueFlag,
3477 "set maximum number of nested #include files (ANSI89 minimum is 8; ISO99 is 63)",
3478 "Maximum number of nested #include files exceeded.",
3482 FK_LIMITS, FK_ANSI, specialFlag,
3485 "check for violations of standard limits (controlnestdepth, "
3486 "stringliterallen, includenest, numstructfields, numenummembers) based on ANSI89 standard",
3491 FK_LIMITS, FK_ANSI, specialFlag,
3494 "check for violations of standard limits (controlnestdepth, "
3495 "stringliterallen, includenest, numstructfields, numenummembers) based on ISO99 standard",
3501 FK_PREPROC, FK_NONE, globalExtraArgFlag,
3504 "passed to pre-processor",
3508 FK_PREPROC, FK_NONE, globalExtraArgFlag,
3511 "passed to pre-processor",
3515 FK_PREPROC, FK_SYNTAX, plainFlag,
3517 FLG_UNRECOGDIRECTIVE,
3518 "unrecognized pre-processor directive",
3519 "Pre-processor directive is not recognized.",
3523 FK_SUPPRESS, FK_COMMENTS, globalFlag,
3526 "The number of errors detected does not match number in /*@i<n>@*/.",
3530 FK_SUPPRESS, FK_ERRORS, valueFlag,
3533 "limit <int> consecutive repeated errors",
3537 FK_SYNTAX, FK_NONE, plainFlag,
3540 "syntax error in parsing",
3541 "Code cannot be parsed. For help on parse errors, see splint -help parseerrors.",
3545 FK_SYNTAX, FK_NONE, plainFlag,
3548 "try to recover from parse error",
3549 "Try to recover from parse error. It really means try - this doesn't usually work.", 0, 0
3552 FK_SYNTAX, FK_PREPROC, plainFlag,
3555 "preprocessing error",
3556 "Preprocessing error.",
3561 FK_TYPE, FK_NONE, plainFlag,
3565 "Types are incompatible.",
3570 FK_TYPE, FK_NONE, plainFlag,
3571 "stringliteraltoolong",
3572 FLG_STRINGLITTOOLONG,
3573 "string literal too long for character array",
3574 "A string literal is assigned to a char array too small to hold it.",
3578 FK_TYPE, FK_NONE, modeFlag,
3579 "stringliteralnoroomfinalnull",
3580 FLG_STRINGLITNOROOMFINALNULL,
3581 "string literal leaves no room for null terminator",
3582 "A string literal is assigned to a char array that is not big enough to hold the final null terminator. This may not be a problem because a null character has been explictedly included in the string literal using an escape sequence",
3586 FK_TYPE, FK_NONE, modeFlag,
3587 "stringliteralnoroom",
3588 FLG_STRINGLITNOROOM,
3589 "string literal leaves no room for null terminator",
3590 "A string literal is assigned to a char array that is not big enough to hold the null terminator.",
3594 FK_TYPE, FK_NONE, modeFlag,
3595 "stringliteralsmaller",
3596 FLG_STRINGLITSMALLER,
3597 "string literal is smaller than the char array it is assigned to",
3598 "A string literal is assigned to a char array that smaller than the string literal needs.",
3602 FK_TYPE, FK_NONE, modeFlag,
3605 "enum members must be int values",
3606 "Type of initial values for enum members must be int.",
3611 FK_TYPE, FK_NONE, plainFlag,
3614 "type-mismatch in parameter corresponding to format code in a printf or scanf-like function",
3615 "Type of parameter is not consistent with corresponding code in format string.",
3619 FK_TYPE, FK_NONE, modeFlag,
3622 "format parameter is not a string constant (hence variable arguments cannot be typechecked)",
3623 "Format parameter is not known at compile-time. This can lead to security vulnerabilities because the arguments cannot be type checked.",
3627 FK_TYPE, FK_NONE, plainFlag,
3630 "invalid format code in format string for printf or scanf-like function",
3631 "Format code in a format string is not valid.",
3635 FK_TYPEEQ, FK_ABSTRACT, modeFlag,
3638 "forward declarations of pointers to abstract representation match abstract type",
3642 FK_TYPEEQ, FK_ABSTRACT, modeFlag,
3645 "void * matches pointers to abstract types, casting ok (dangerous)",
3646 "A pointer to void is cast to a pointer to an abstract type (or vice versa).",
3650 FK_TYPEEQ, FK_POINTER, plainFlag,
3653 "a pointer to a function is cast to a pointer to void (or vice versa)",
3654 "A pointer to a function is cast to (or used as) a pointer to void (or vice versa).",
3658 FK_TYPEEQ, FK_ARRAY, modeFlag,
3661 "char can be used to index arrays",
3662 "To allow char types to index arrays, use +charindex.", 0, 0
3665 FK_TYPEEQ, FK_ARRAY, modeFlag,
3668 "enum can be used to index arrays",
3669 "To allow enum types to index arrays, use +enumindex.", 0, 0
3672 FK_TYPEEQ, FK_BOOL, modeFlag,
3675 "bool and int are equivalent",
3676 "To make bool and int types equivalent, use +boolint.",
3680 FK_TYPEEQ, FK_NONE, modeFlag,
3683 "char and int are equivalent",
3684 "To make char and int types equivalent, use +charint.",
3688 FK_TYPEEQ, FK_NONE, modeFlag,
3691 "enum and int are equivalent",
3692 "To make enum and int types equivalent, use +enumint.",
3696 FK_TYPEEQ, FK_NONE, modeFlag,
3699 "float and double are equivalent",
3700 "To make float and double types equivalent, use +floatdouble.",
3704 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3707 "ignore type qualifiers (long, short, unsigned)",
3708 "To ignore type qualifiers in type comparisons use +ignorequals.",
3712 FK_TYPEEQ, FK_SYNTAX, plainFlag,
3715 "report duplicate type qualifiers (e.g., unsigned unsigned)",
3716 "Duplicate type qualifiers not supported by ISO standard.",
3720 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3723 "ignore signs in type comparisons (unsigned matches signed)",
3724 "To ignore signs in type comparisons use +ignoresigns",
3728 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3731 "int literals can be reals",
3732 "An int literal is used as any numeric type (including float and long long). Use +numliteral to "
3733 "allow int literals to be used as any numeric type.",
3737 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3740 "character constants (e.g., 'a') can be used as ints",
3741 "A character constant is used as an int. Use +charintliteral to "
3742 "allow character constants to be used as ints. (This is safe "
3743 "since the actual type of a char constant is int.)",
3747 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3750 "report qualifier mismatches only if dangerous",
3751 "To allow qualifier mismatches that are not dangerous, use +relaxquals.", 0, 0
3754 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3757 "allow all numeric types to match",
3758 "To allow all numeric types to match, use +relaxtypes.", 0, 0
3761 FK_TYPEEQ, FK_NONE, modeFlag,
3763 FLG_CHARUNSIGNEDCHAR,
3764 "allow char and unsigned char types to match",
3765 "To allow char and unsigned char types to match use +charunsignedchar.",
3769 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3771 FLG_MATCHANYINTEGRAL,
3772 "allow any intergral type to match an arbitrary integral type (e.g., dev_t)",
3773 "To allow arbitrary integral types to match any integral type, use +matchanyintegral.",
3777 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3778 "longunsignedintegral",
3779 FLG_LONGUNSIGNEDINTEGRAL,
3780 "allow long unsigned type to match an arbitrary integral type (e.g., dev_t)",
3781 "To allow arbitrary integral types to match long unsigned, use +longunsignedintegral.",
3785 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3788 "allow long type to match an arbitrary integral type (e.g., dev_t)",
3789 "To allow arbitrary integral types to match long unsigned, use +longintegral.",
3793 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3794 "longunsignedunsignedintegral",
3795 FLG_LONGUNSIGNEDUNSIGNEDINTEGRAL,
3796 "allow long unsigned type to match an arbitrary unsigned integral type (e.g., size_t)",
3797 "To allow arbitrary unsigned integral types to match long unsigned, "
3798 "use +longunsignedunsignedintegral.",
3802 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3803 "longsignedintegral",
3804 FLG_LONGSIGNEDINTEGRAL,
3805 "allow long type to match an arbitrary signed integral type (e.g., ssize_t)",
3806 "To allow arbitrary signed integral types to match long unsigned, use +longsignedintegral.",
3810 FK_TYPEEQ, FK_POINTER, plainFlag,
3813 "treat 0 as a pointer",
3817 FK_TYPEEQ, FK_BOOL, modeFlag,
3820 "treat 0 as a boolean",
3824 FK_UNRECOG, FK_DISPLAY, plainFlag,
3827 "do not suppress repeated unrecognized identifier messages (instead of only reporting the first error)",
3828 "Identifier used in code has not been declared. (Message repeated for future uses in this file.)",
3832 FK_UNRECOG, FK_DISPLAY, plainFlag,
3835 "report unrecognized identifiers with system (__) prefix",
3836 "Identifier used in code has not been declared. (Message repeated for "
3837 "future uses in this file.) Use +gnuextensions to make Splint "
3838 "recognize some keywords that are gnu extensions.",
3842 FK_UNRECOG, FK_NONE, plainFlag,
3845 "unrecognized identifier",
3846 "Identifier used in code has not been declared.", 0, 0
3851 FK_DECL, FK_TYPE, plainFlag,
3853 FLG_ANNOTATIONERROR,
3854 "annotation is used in inconsistent location",
3855 "A declaration uses an invalid annotation.",
3859 FK_DECL, FK_TYPE, plainFlag,
3862 "inconsistent syntactic comment",
3863 "A syntactic comment is used inconsistently.",
3872 FK_WARNUSE, FK_NONE, plainFlag,
3875 "warn when declaration marked with warn is used",
3876 "Declaration marked with warn clause is used (can be suppresed by more specific flags).",
3880 FK_WARNUSE, FK_SECURITY, modeFlag,
3883 "possible buffer overflow vulnerability",
3884 "Use of function that may lead to buffer overflow.",
3888 FK_WARNUSE, FK_SECURITY, modeFlag,
3889 "bufferoverflowhigh",
3890 FLG_BUFFEROVERFLOWHIGH,
3891 "likely buffer overflow vulnerability",
3892 "Use of function that may lead to buffer overflow.",
3896 FK_WARNUSE, FK_SECURITY, modeFlag,
3897 "implementationoptional",
3898 FLG_IMPLEMENTATIONOPTIONAL,
3899 "declarator is implementation optional (ISO99 does not require an implementation to provide it)",
3900 "Use of a declarator that is implementation optional, not required by ISO99.",
3904 FK_WARNUSE, FK_NONE, modeFlag,
3907 "legacy declaration in Unix Standard",
3908 "Use of a declarator that is marked as a legacy entry in the Unix Standard.",
3912 FK_WARNUSE, FK_SECURITY, modeFlag,
3915 "function is not reentrant",
3916 "Non-reentrant function should not be used in multithreaded code.",
3920 FK_WARNUSE, FK_SECURITY, modeFlag,
3923 "function may have undefined behavior",
3924 "Use of function that may have implementation-dependent behavior.",
3928 FK_WARNUSE, FK_SECURITY, modeFlag,
3931 "function is restricted to superusers",
3932 "Call to function restricted to superusers.",
3936 FK_WARNUSE, FK_SECURITY, modeFlag,
3939 "possible time of check, time of use vulnerability",
3940 "Possible time of check, time of use vulnerability.",
3944 FK_WARNUSE, FK_SECURITY, modeFlag,
3947 "function is not required in Standard UNIX Specification",
3948 "Use of function that need not be provided by UNIX implementations",
3953 ** ITS4 Compability Flags
3955 ** These flags flags must appear in order (most severe -> weakest).
3959 FK_ITS4, FK_SECURITY, specialFlag,
3962 "most risky security vulnerabilities (from its4 database)",
3963 "Security vulnerability classified as most risky in its4 database.",
3967 FK_ITS4, FK_SECURITY, specialFlag,
3970 "very risky security vulnerabilities (from its4 database)",
3971 "Security vulnerability classified as very risky in its4 database.",
3975 FK_ITS4, FK_SECURITY, specialFlag,
3978 "risky security vulnerabilities (from its4 database)",
3979 "Security vulnerability classified as risky in its4 database.",
3983 FK_ITS4, FK_SECURITY, specialFlag,
3985 FLG_ITS4MODERATERISK,
3986 "moderately risky security vulnerabilities (from its4 database)",
3987 "Security vulnerability classified as moderate risk in its4 database.",
3991 FK_ITS4, FK_SECURITY, specialFlag,
3994 "risky security vulnerabilities (from its4 database)",
3995 "Security vulnerability classified as risky in its4 database.",
4000 ** Syntactic comments
4004 FK_SYNCOMMENTS, FK_SUPPRESS, plainFlag,
4007 "ignore all stylized comments",
4011 FK_SYNCOMMENTS, FK_ABSTRACT, plainFlag,
4014 "ignore access comments",
4019 FK_SYNCOMMENTS, FK_SYNTAX, plainFlag,
4021 FLG_UNRECOGCOMMENTS,
4022 "stylized comment is unrecognized",
4023 "Word after a stylized comment marker does not correspond to a "
4024 "stylized comment.",
4028 FK_SYNCOMMENTS, FK_SYNTAX, plainFlag,
4029 "unrecogflagcomments",
4030 FLG_UNRECOGFLAGCOMMENTS,
4031 "stylized flag comment uses an unrecognized flag",
4032 "Semantic comment attempts to set a flag that is not recognized.",
4036 FK_SYNCOMMENTS, FK_SUPPRESS, modeFlag,
4039 "interpret t comments (ignore errors in lines marked with /*@t<n>@*/",
4043 FK_SYNCOMMENTS, FK_SUPPRESS, plainFlag,
4046 "interpret traditional lint comments (/*FALLTHROUGH*/, /*NOTREACHED*/)",
4050 FK_SYNCOMMENTS, FK_SUPPRESS, modeFlag,
4052 FLG_WARNLINTCOMMENTS,
4053 "warn when a traditional lint comment is used",
4054 "A traditional lint comment is used. Some traditional lint comments "
4055 "are interpreted by Splint to enable easier checking of legacy "
4056 "code. It is preferable to replace these comments with the "
4057 "suggested Splint alternative.",
4066 FK_COMMENTS, FK_SYNTAX, plainFlag,
4068 FLG_CONTINUECOMMENT,
4069 "line continuation marker (\\) in comment before */ on same line",
4070 "A line continuation marker (\\) appears inside a comment on the same "
4071 "line as the comment close. Preprocessors should handle this "
4072 "correctly, but it causes problems for some preprocessors.",
4076 FK_COMMENTS, FK_SYNTAX, plainFlag,
4077 "slashslashcomment",
4078 FLG_SLASHSLASHCOMMENT,
4079 "use of // comment",
4080 "A // comment is used. ISO C99 allows // comments, but earlier standards did not.",
4084 FK_COMMENTS, FK_SYNTAX, plainFlag,
4087 "comment begins inside comment",
4088 "A comment open sequence (/*) appears within a comment. This usually "
4089 "means an earlier comment was not closed.",
4094 ** Flags for controlling warning message printing.
4100 FK_DISPLAY, FK_ERRORS, plainFlag,
4103 "suppress herald and error count",
4108 ** Default is to send messages, warnings and errors to stderr
4112 FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4113 "messagestreamstdout",
4114 FLG_MESSAGESTREAMSTDOUT,
4115 "send status messages to standard output stream",
4119 FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4120 "messagestreamstderr",
4121 FLG_MESSAGESTREAMSTDERR,
4122 "send status messages to standard error stream",
4126 FK_DISPLAY, FK_ERRORS, globalStringFlag, ARG_FILE,
4129 "send status messages to <file>",
4134 FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4135 "warningstreamstdout",
4136 FLG_WARNINGSTREAMSTDOUT,
4137 "send warnings to standard output stream",
4141 FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4142 "warningstreamstderr",
4143 FLG_WARNINGSTREAMSTDERR,
4144 "send warnings to standard error stream",
4148 FK_DISPLAY, FK_ERRORS, globalStringFlag, ARG_FILE,
4151 "send warnings to <file>",
4156 FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4157 "errorstreamstdout",
4158 FLG_ERRORSTREAMSTDOUT,
4159 "send fatal errors to standard output stream",
4163 FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4164 "errorstreamstderr",
4165 FLG_ERRORSTREAMSTDERR,
4166 "send fatal errors to standard error stream",
4170 FK_DISPLAY, FK_ERRORS, globalStringFlag, ARG_FILE,
4173 "send fatal errors to <file>",
4178 FK_DISPLAY, FK_ERRORS, globalFlag,
4180 FLG_STREAMOVERWRITE,
4181 "warn and exit if a stream output file would overwrite an existing file",
4187 FK_DISPLAY, FK_ERRORS, plainFlag,
4190 "show summary of all errors reported and suppressed",
4194 FK_DISPLAY, FK_FILES, plainFlag,
4197 "show file names are they are processed",
4201 FK_DISPLAY, FK_FILES, plainFlag,
4204 "Splint has been run on a system file, by default no errors are reported for system files. Use +systemdirerrors if you want splint to report errors in system files. A file is considered a system file if it is in a system directory or a subdirectory of a system directory. The sysdirs flag can be used to control the directories treated as system directories.",
4208 FK_DISPLAY, FK_NONE, globalFlag,
4211 "display lines processed and time",
4215 FK_DISPLAY, FK_NONE, globalFlag,
4218 "display time distribution",
4222 FK_DISPLAY, FK_USE, globalFlag,
4225 "show sorted list of uses of all globals",
4232 FK_HINTS, FK_FORMAT, plainFlag,
4235 "provide a hint the first time a particular warning appears",
4236 "Provide a hint the first time a particular warning appears",
4240 FK_HINTS, FK_FORMAT, plainFlag,
4243 "provide a hint for every warnings",
4244 "Provide a hint for every warning",
4249 ** Flags for debugging
4253 FK_DEBUG, FK_NONE, valueFlag,
4256 "set maximum number of bugs detected before giving up",
4260 FK_DEBUG, FK_BOUNDS, plainFlag,
4261 "debugfcnconstraint",
4262 FLG_DEBUGFUNCTIONCONSTRAINT,
4263 "debug function constraints",
4264 "Perform buffer overflow checking even if the errors would be surpressed.",
4268 FK_DEBUG, FK_NONE, specialDebugFlag,
4271 "debug parsing", NULL,
4275 FK_DEBUG, FK_NONE, debugFlag,
4278 "do not delete temporary files", NULL,
4282 FK_DEBUG, FK_NONE, debugFlag,
4285 "do not pre-process input files", NULL,
4289 FK_DEBUG, FK_NONE, debugFlag,
4292 "display the source code location where a warning is produced", NULL,