]> andersk Git - splint.git/blame - src/flags.def
Added check of user specified post conditions.
[splint.git] / src / flags.def
CommitLineData
885824d3 1/*;-*-C-*-;
2**
3** flags.def
4**
5** This file is used to generate the flag header files.
a0a162cd 6**
7** Don't forget to regenerate flag_codes.gen. (lost the Makefile...bleech!)
885824d3 8*/
885824d3 9 /* spec idem global mode args */
10/*@-namechecks@*/
11/*@notfunction@*/
12# define modeFlag FALSE, FALSE, FALSE, TRUE, ARG_NONE
13/*@notfunction@*/
14# define plainFlag FALSE, FALSE, FALSE, FALSE, ARG_NONE
15/*@notfunction@*/
16# define specialFlag TRUE, FALSE, FALSE, FALSE, ARG_NONE
17/*@notfunction@*/
18# define plainSpecialFlag TRUE, FALSE, FALSE, FALSE, ARG_NONE
19/*@notfunction@*/
20# define idemSpecialFlag TRUE, TRUE, FALSE, FALSE, ARG_NONE
21/*@notfunction@*/
22# define valueFlag FALSE, FALSE, FALSE, FALSE, ARG_VALUE
23/*@notfunction@*/
24# define modeValueFlag FALSE, FALSE, FALSE, TRUE, ARG_VALUE
25/*@notfunction@*/
26# define specialValueFlag TRUE, FALSE, FALSE, FALSE, ARG_VALUE
27/*@notfunction@*/
28# define debugFlag FALSE, TRUE, FALSE, FALSE, ARG_NONE
29/*@notfunction@*/
30# define specialDebugFlag TRUE, TRUE, FALSE, FALSE, ARG_NONE
31/*@notfunction@*/
32# define globalFlag FALSE, FALSE, TRUE, FALSE, ARG_NONE
33/*@notfunction@*/
34# define idemGlobalFlag FALSE, TRUE, TRUE, FALSE, ARG_NONE
35/*@notfunction@*/
36# define globalValueFlag FALSE, FALSE, TRUE, FALSE, ARG_VALUE
37/*@notfunction@*/
38# define regStringFlag FALSE, FALSE, FALSE, FALSE, ARG_STRING
39/*@notfunction@*/
40# define idemStringFlag FALSE, TRUE, FALSE, FALSE, ARG_STRING
41/*@notfunction@*/
42# define globalStringFlag FALSE, FALSE, TRUE, FALSE, ARG_STRING
43/*@notfunction@*/
44# define extraArgFlag FALSE, FALSE, FALSE, FALSE, ARG_SPECIAL
45/*@notfunction@*/
46# define globalExtraArgFlag FALSE, FALSE, TRUE, FALSE, ARG_SPECIAL
47/*@=namechecks@*/
48
49/*
50** Note: the flag code must be on a separate line, since I'm
51** too stupid to write an awk/sed/whatever script that can separate
52** the lines.
53*/
54
55static flaglist flags = {
a0a162cd 56 /* Deprecated
885824d3 57{
58 FK_ABSTRACT, FK_BOOL, plainFlag,
59 "bool",
f5ac53de 60 F*//*Hide flag from makefile grep*//*LG_ABSTRACTBOOL,
885824d3 61 "boolean type is abstract",
62 NULL, 0, 0
63 },
a0a162cd 64 */
885824d3 65{
66 FK_BOOL, FK_HELP, plainFlag,
67 "likelybool",
68 FLG_LIKELYBOOL,
69 "type name is probably a boolean type but does not match default "
70 "boolean type name, \"bool\", and alternate name is not set",
71 "Use the -booltype, -boolfalse and -booltrue flags to change the "
72 "name of the default boolean type.",
73 0, 0
74 },
75{
76 FK_ABSTRACT, FK_IMPLICIT, plainFlag,
77 "impabstract",
78 FLG_IMPABSTRACT,
79 "assume user type definitions are abstract (unless /*@concrete@*/ is used)",
80 NULL,
81 0, 0
82 },
83{
84 FK_ABSTRACT, FK_NAMES, specialFlag,
85 "accessall",
86 FLG_ACCESSALL,
87 "set accessmodule, accessfile and accessczech",
88 "Sets accessmodule, accessfile and accessczech",
89 0, 0
90 },
91{
92 FK_ABSTRACT, FK_NAMES, plainFlag,
93 "accessmodule",
94 FLG_ACCESSMODULE,
95 "allow access to abstract types in definition module",
96 "The representation of an abstract type defined in <M>.<x> is "
97 "accessible anywhere in a file named <M>.<y>.",
98 0, 0
99 },
100{
101 FK_ABSTRACT, FK_NAMES, plainFlag,
102 "accessfile",
103 FLG_ACCESSFILE,
104 "allow access to abstract types by file name convention",
105 "The representation of an abstract type named <t> is "
106 "accessible anywhere in a file named <t>.<x>.",
107 0, 0
108 },
109{
110 FK_ABSTRACT, FK_NAMES, plainFlag,
111 "accessczech",
112 FLG_ACCESSCZECH,
113 "allow access to abstract types by czech naming convention",
114 "The representation of an abstract type named <t> is accessible "
115 "in the definition of a function or constant named <t>_<name>",
116 0, 0
117 },
118{
119 FK_ABSTRACT, FK_NAMES, plainFlag,
120 "accessslovak",
121 FLG_ACCESSSLOVAK,
122 "allow access to abstract types by slovak naming convention",
123 "The representation of an abstract type named <t> is accessible "
124 "in the definition of a function or constant named <t><Name>",
125 0, 0
126 },
127{
128 FK_ABSTRACT, FK_NAMES, plainFlag,
129 "accessczechoslovak",
130 FLG_ACCESSCZECHOSLOVAK,
131 "allow access to abstract types by czechoslovak naming convention",
132 "The representation of an abstract type named <t> is accessible "
133 "in the definition of a function or constant named <t>_<name> or <t><Name>",
134 0, 0
135 },
136{
137 FK_ABSTRACT, FK_NONE, plainFlag,
138 "abstract",
139 FLG_ABSTRACT,
140 "data abstraction barriers",
141 "An abstraction barrier is broken. If necessary, use /*@access <type>@*/ to allow access to an abstract type.",
142 0, 0
143 },
144{
145 FK_ABSTRACT, FK_NONE, modeFlag,
146 "mutrep",
147 FLG_MUTREP,
148 "representation of mutable type has sharing semantics",
149 "LCL semantics requires that a mutable type exhibits sharing semantics. In order for objects to be shared a indirection is necessary in the representation. A mutable type may be represented by a pointer or an abstract mutable type. Handles into static data are fine, too, but will generate this error message unless it is suppressed.",
150 0, 0
151 },
152{
153 FK_ALIAS, FK_GLOBALS, specialFlag,
154 "globalias",
155 FLG_GLOBALIAS,
156 "function returns with global aliasing external state (sets "
157 "checkstrictglobalias, checkedglobalias, checkmodglobalias and "
158 "uncheckedglobalias)",
159 "A global variable aliases externally-visible state when the function returns.",
160 0, 0
161 },
162{
163 FK_ALIAS, FK_GLOBALS, modeFlag,
164 "checkstrictglobalias",
165 FLG_CHECKSTRICTGLOBALIAS,
166 "function returns with a checkstrict global aliasing external state",
167 "A global variable aliases externally-visible state when the function returns.",
168 0, 0
169 },
170{
171 FK_ALIAS, FK_GLOBALS, modeFlag,
172 "checkedglobalias",
173 FLG_CHECKEDGLOBALIAS,
174 "function returns with a checked global aliasing external state",
175 "A global variable aliases externally-visible state when the function returns.",
176 0, 0
177 },
178{
179 FK_ALIAS, FK_GLOBALS, modeFlag,
180 "checkmodglobalias",
181 FLG_CHECKMODGLOBALIAS,
182 "function returns with a checkmod global aliasing external state",
183 "A global variable aliases externally-visible state when the function returns.",
184 0, 0
185 },
186{
187 FK_ALIAS, FK_GLOBALS, modeFlag,
188 "uncheckedglobalias",
189 FLG_UNCHECKEDGLOBALIAS,
190 "function returns with an unchecked global aliasing external state",
191 "A global variable aliases externally-visible state when the function returns.",
192 0, 0
193 },
194{
195 FK_ALIAS, FK_MEMORY, modeFlag,
196 "aliasunique",
197 FLG_ALIASUNIQUE,
198 "unique parameter is aliased",
199 "A unique or only parameter is aliased by some other parameter or visible global.",
200 0, 0
201 },
202{
203 FK_ALIAS, FK_MEMORY, modeFlag,
204 "mayaliasunique",
205 FLG_MAYALIASUNIQUE,
206 "unique parameter may be aliased",
207 "A unique or only parameter may be aliased by some other parameter or visible global.",
208 0, 0
209 },
210{
211 FK_ALIAS, FK_MEMORY, modeFlag,
212 "mustnotalias",
213 FLG_MUSTNOTALIAS,
214 "temp storage aliased at return point or scope exit",
215 "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.",
216 0, 0
217 },
218{
219 FK_ALIAS, FK_NONE, modeFlag,
220 "retalias",
221 FLG_RETALIAS,
222 "function returns alias to parameter or global",
223 "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
224 },
225{
226 FK_ANSI, FK_PROTOS, modeFlag,
227 "noparams",
228 FLG_NOPARAMS,
229 "function declaration has no parameter list",
230 "A function declaration does not have a parameter list.",
231 0, 0
232 },
233{
234 FK_ANSI, FK_PROTOS, modeFlag,
235 "oldstyle",
236 FLG_OLDSTYLE,
237 "old style function definition",
238 "Function definition is in old style syntax. Standard prototype "
239 "syntax is preferred.",
240 0, 0
241 },
242{
243 FK_ANSI, FK_SYNTAX, plainFlag,
244 "gnuextensions",
245 FLG_GNUEXTENSIONS,
246 "support some gnu (gcc) language extensions",
247 NULL, 0, 0
248 },
249{
250 FK_ANSI, FK_NONE, plainFlag,
251 "usevarargs",
252 FLG_USEVARARGS,
253 "non-standard <varargs.h> included",
254 "Header <varargs.h> is not part of ANSI Standard. "
255 "Should use <stdarg.h> instead.",
256 0, 0
257 },
258{
259 FK_ANSI, FK_LIBS, plainFlag,
260 "warnposixheaders",
261 FLG_WARNPOSIX,
262 "a POSIX header is included, but the POSIX library is not used",
263 "Header name matches a POSIX header, but the POSIX library is not selected.",
264 0, 0
265 },
266{
267 FK_BEHAVIOR, FK_ANSI, modeFlag,
268 "exitarg",
269 FLG_EXITARG,
270 "argument to exit has implementation defined behavior",
271 "The argument to exit should be 0, EXIT_SUCCESS or EXIT_FAILURE",
272 0, 0
273 },
274{
275 FK_BEHAVIOR, FK_ANSI, modeFlag,
276 "evalorder",
277 FLG_EVALORDER,
278 "code has unspecified or implementation-dependent behavior "
279 "because of order of evaluation",
280 "Code has unspecified behavior. "
281 "Order of evaluation of function parameters or subexpressions "
282 "is not defined, so if a value is used and modified in different "
283 "places not separated by a sequence point constraining "
284 "evaluation order, then the result of the expression is "
285 "unspecified.",
286 0, 0
287 },
288{
289 FK_BEHAVIOR, FK_ANSI, modeFlag,
290 "evalorderuncon",
291 FLG_EVALORDERUNCON,
292 "code involving call to unspecified function has undefined or implementation-dependent behavior",
293 "Code involving a call to function with no modifies or globals clause "
294 "may have undefined or implementation-dependent behavior (LCLint assumes the "
295 "unconstrained call may modify any reachable state or use any global). Add a "
296 "specification for the function.",
297 0, 0
298 },
299{
300 FK_BOOL, FK_NONE, regStringFlag,
301 "boolfalse",
302 FLG_BOOLFALSE,
303 "set name of boolean false (default FALSE)",
304 NULL, 0, 0
305 },
306{
307 FK_BOOL, FK_NONE, regStringFlag,
308 "booltype",
309 FLG_BOOLTYPE,
310 "set name of boolean type (default bool)",
311 NULL, 0, 0
312 },
313{
314 FK_BOOL, FK_NONE, regStringFlag,
315 "booltrue",
316 FLG_BOOLTRUE,
317 "set name of boolean true (default TRUE)",
318 NULL, 0, 0
319 },
320{
321 FK_COMMENTS, FK_ABSTRACT, plainFlag,
322 "noaccess",
323 FLG_NOACCESS,
324 "ignore access comments",
325 NULL, 0, 0
326 },
327{
328 FK_COMMENTS, FK_SUPPRESS, plainFlag,
329 "nocomments",
330 FLG_NOCOMMENTS,
331 "ignore all stylized comments",
332 NULL, 0, 0
333 },
334{
335 FK_COMMENTS, FK_SYNTAX, plainFlag,
336 "unrecogcomments",
337 FLG_UNRECOGCOMMENTS,
338 "stylized comment is unrecognized",
339 "Word after a stylized comment marker does not correspond to a "
340 "stylized comment.",
341 0, 0
342 },
343{
344 FK_COMMENTS, FK_SYNTAX, plainFlag,
345 "continuecomment",
346 FLG_CONTINUECOMMENT,
347 "line continuation marker (\\) in comment before */ on same line",
348 "A line continuation marker (\\) appears inside a comment on the same "
349 "line as the comment close. Preprocessors should handle this "
350 "correctly, but it causes problems for some preprocessors.",
351 0, 0
352 },
353{
354 FK_COMMENTS, FK_SYNTAX, plainFlag,
355 "nestcomment",
356 FLG_NESTCOMMENT,
357 "comment begins inside comment",
358 "A comment open sequence (/*) appears within a comment. This usually "
359 "means an earlier comment was not closed.",
360 0, 0
361 },
362{
363 FK_COMMENTS, FK_SUPPRESS, modeFlag,
364 "tmpcomments",
365 FLG_TMPCOMMENTS,
366 "interpret t comments (ignore errors in lines marked with /*@t<n>@*/",
367 NULL, 0, 0
368 },
369{
370 FK_COMMENTS, FK_SUPPRESS, plainFlag,
371 "lintcomments",
372 FLG_LINTCOMMENTS,
373 "interpret traditional lint comments (/*FALLTHROUGH*/, /*NOTREACHED*/)",
374 NULL, 0, 0
375 },
376{
377 FK_COMMENTS, FK_SUPPRESS, modeFlag,
378 "warnlintcomments",
379 FLG_WARNLINTCOMMENTS,
380 "print a warning and suggest an alternative when a traditional lint "
381 "comment is used",
382 "A traditional lint comment is used. Some traditional lint comments "
383 "are interpreted by LCLint to enable easier checking of legacy "
384 "code. It is preferable to replace these comments with the "
385 "suggested LCLint alternative.",
386 0, 0
387 },
388{
389 FK_COMPLETE, FK_NONE, modeFlag,
390 "declundef",
391 FLG_DECLUNDEF,
392 "function or variable declared but never defined",
393 "A function or variable is declared, but not defined in any source code file.",
394 0, 0
395 },
396{
397 FK_COMPLETE, FK_SPEC, modeFlag,
398 "specundef",
399 FLG_SPECUNDEF,
400 "function or variable specified but never defined",
401 "A function or variable is declared in an .lcl file, but not defined in any source code file.",
402 0, 0
403 },
404{
405 FK_COMPLETE, FK_SPEC, plainFlag,
406 "specundecl",
407 FLG_SPECUNDECL,
408 "function or variable specified but never declared in a source file",
409 "A function or variable is declared in an .lcl file, but not declared "
410 "in any source code file.",
411 0, 0
412 },
413{
414 FK_CONTROL, FK_MEMORY, modeFlag,
415 "loopexec",
416 FLG_LOOPEXEC,
417 "assume all loops execute at least once",
418 NULL, 0, 0
419 },
420{
421 FK_CONTROL, FK_NONE, plainFlag,
422 "control",
423 FLG_CONTROL,
424 NULL, NULL,
425 0, 0
426 },
427{
428 FK_CONTROL, FK_NONE, modeFlag,
429 "infloops",
430 FLG_INFLOOPS,
431 "likely infinite loop is detected",
432 "This appears to be an infinite loop. Nothing in the body of the "
433 "loop or the loop test modifies the value of the loop test. "
434 "Perhaps the specification of a function called in the loop "
435 "body is missing a modification.",
436 0, 0
437 },
438{
439 FK_CONTROL, FK_NONE, modeFlag,
440 "infloopsuncon",
441 FLG_INFLOOPSUNCON,
442 "likely infinite loop is detected (may result from unconstrained function)",
443 "This appears to be an infinite loop. Nothing in the body of the "
444 "loop or the loop test modifies the value of the loop test. "
445 "There may be a modification through a call to an unconstrained "
446 "function, or an unconstrained function in the loop test may use "
447 "a global variable modified by the loop body.",
448 0, 0
449 },
450{
451 FK_CONTROL, FK_NONE, specialFlag,
452 "deepbreak",
453 FLG_DEEPBREAK,
454 "break inside nested while or for or switch",
455 "A break statement appears inside the body of a nested while, for or "
456 "switch statement. Sets looploopbreak, loopswitchbreak, "
457 "switchloopbreak, switchswitchbreak, and looploopcontinue.",
458 0, 0
459 },
460{
461 FK_CONTROL, FK_NONE, modeFlag,
462 "looploopbreak",
463 FLG_LOOPLOOPBREAK,
464 "break inside nested while or for",
465 "A break statement appears inside the body of a nested while or for "
466 "statement. This is perfectly reasonable code, but check that "
467 "the break is intended to break only the inner loop. The "
468 "break statement may be preceded by /*@innerbreak@*/ to suppress "
469 "the message for this break only.",
470 0, 0
471 },
472{
473 FK_CONTROL, FK_NONE, modeFlag,
474 "switchloopbreak",
475 FLG_SWITCHLOOPBREAK,
476 "break in loop inside switch",
477 "A break statement appears inside the body of a while or for "
478 "statement within a switch. This is perfectly reasonable code, but check that "
479 "the break is intended to break only the inner loop. The "
480 "break statement may be preceded by /*@loopbreak@*/ to suppress "
481 "the message for this break only.",
482 0, 0
483 },
484 {
485 FK_CONTROL, FK_NONE, modeFlag,
486 "loopswitchbreak",
487 FLG_LOOPSWITCHBREAK,
488 "break in switch inside loop",
489 "A break statement appears inside a switch statement within a while or "
490 "for loop. This is perfectly reasonable code, but check that "
491 "the break is intended to break only the inner loop. The "
492 "break statement may be preceded by /*@switchbreak@*/ to suppress "
493 "the message for this break only.",
494 0, 0
495 },
496 {
497 FK_CONTROL, FK_NONE, modeFlag,
498 "switchswitchbreak",
499 FLG_SWITCHSWITCHBREAK,
500 "break in switch inside switch",
501 "A break statement appears inside a switch statement within another "
502 "switch statement. This is perfectly reasonable code, but check that "
503 "the break is intended to break only the inner switch. The "
504 "break statement may be preceded by /*@innerbreak@*/ to suppress "
505 "the message for this break only.",
506 0, 0
507 },
508 {
509 FK_CONTROL, FK_NONE, modeFlag,
510 "looploopcontinue",
511 FLG_LOOPLOOPCONTINUE,
512 "continue inside nested loop",
513 "A continue statement appears inside a loop within a loop. "
514 "This is perfectly reasonable code, but check that "
515 "the continue is intended to continue only the inner loop. The "
516 "continue statement may be preceded by /*@innercontinue@*/ to suppress "
517 "the message for this continue only.",
518 0, 0
519 },
520{
521 FK_CONTROL, FK_NONE, modeFlag,
522 "unreachable",
523 FLG_UNREACHABLE,
524 "unreachable code detected",
525 "This code will never be reached on any possible execution.",
526 0, 0
527 },
528{
529 FK_CONTROL, FK_NONE, modeFlag,
530 "whileempty",
531 FLG_WHILEEMPTY,
532 "a while statement has no body",
533 "While statement has no body.",
534 0, 0
535 },
536{
537 FK_CONTROL, FK_NONE, modeFlag,
538 "whileblock",
539 FLG_WHILEBLOCK,
540 "the body of a while statement is not a block",
541 "While body is a single statement, not a compound block.",
542 0, 0
543 },
544{
545 FK_CONTROL, FK_NONE, modeFlag,
546 "forempty",
547 FLG_FOREMPTY,
548 "a for statement has no body",
549 "For statement has no body.",
550 0, 0
551 },
552{
553 FK_CONTROL, FK_NONE, modeFlag,
554 "forblock",
555 FLG_FORBLOCK,
556 "the body of a for statement is not a block",
557 "Loop body is a single statement, not a compound block.",
558 0, 0
559 },
560{
561 FK_CONTROL, FK_NONE, modeFlag,
562 "ifempty",
563 FLG_IFEMPTY,
564 "an if statement has no body",
565 "If statement has no body.",
566 0, 0
567 },
568{
569 FK_CONTROL, FK_NONE, modeFlag,
570 "ifblock",
571 FLG_IFBLOCK,
572 "the body of an if statement is not a block",
573 "If body is a single statement, not a compound block.",
574 0, 0
575 },
576{
577 FK_CONTROL, FK_NONE, specialFlag,
578 "allempty",
579 FLG_ALLEMPTY,
580 "an if, while or for statement has no body (sets ifempty, "
581 "whileempty and forempty",
582 NULL,
583 0, 0
584 },
585{
586 FK_CONTROL, FK_NONE, specialFlag,
587 "allblock",
588 FLG_ALLBLOCK,
589 "the body of an if, while or for statement is not a block "
590 "(sets ifblock, whileblock and forblock)",
591 "Body is a single statement, not a compound block.",
592 0, 0
593 },
594{
595 FK_CONTROL, FK_NONE, modeFlag,
596 "elseifcomplete",
597 FLG_ELSEIFCOMPLETE,
598 "if ... else if chains must have final else",
599 "There is no final else following an else if construct.",
600 0, 0
601 },
602{
603 FK_CONTROL, FK_NONE, modeFlag,
604 "noret",
605 FLG_NORETURN,
606 "path with no return detected in non-void function",
607 "There is a path through a function declared to return a value on "
608 "which there is no return statement. This means the execution "
609 "may fall through without returning a meaningful result to "
610 "the caller.",
611 0, 0
612 },
613{
614 FK_CONTROL, FK_NONE, modeFlag,
615 "casebreak",
616 FLG_CASEBREAK,
617 "non-empty case in a switch without preceding break",
618 "Execution falls through from the previous case.", 0, 0
619 },
620{
621 FK_CONTROL, FK_NONE, modeFlag,
622 "misscase",
623 FLG_MISSCASE,
624 "switch on enum type missing case for some value",
625 "Not all values in an enumeration are present as cases in the switch.",
626 0, 0
627 },
628{
629 FK_CONTROL, FK_NONE, modeFlag,
630 "firstcase",
631 FLG_FIRSTCASE,
632 "first statement in switch is not a case",
633 "The first statement after a switch is not a case.",
634 0, 0
635 },
636{
637 FK_DEBUG, FK_NONE, specialDebugFlag,
638 "grammar",
639 FLG_GRAMMAR,
640 NULL, NULL,
641 0, 0
642 },
643{
644 FK_DEBUG, FK_NONE, debugFlag,
645 "nopp",
646 FLG_NOPP,
647 NULL, NULL,
648 0, 0
649 },
650{
651 FK_DECL, FK_NONE, modeFlag,
652 "shadow",
653 FLG_SHADOW,
654 "declaration reuses name visible in outer scope",
655 "An outer declaration is shadowed by the local declaration.",
656 0, 0
657 },
658{
659 FK_DECL, FK_LIBS, modeFlag,
660 "incondefslib",
661 FLG_INCONDEFSLIB,
662 "function, variable or constant defined in a library is redefined with inconsistent type",
663 "A function, variable or constant previously defined in a library is "
664 "redefined with a different type.",
665 0, 0
666 },
667{
668 FK_DECL, FK_LIBS, modeFlag,
669 "overload",
670 FLG_WARNOVERLOAD,
671 "library function overloaded",
672 "A function, variable or constant defined in the library is redefined "
673 "with a different type.",
674 0, 0
675 },
676{
677 FK_DECL, FK_NONE, modeFlag,
678 "nestedextern",
679 FLG_NESTEDEXTERN,
680 "an extern declaration is inside a function scope",
681 "An extern declaration is used inside a function scope.",
682 0, 0
683 },
684{
685 FK_DECL, FK_NONE, modeFlag,
686 "redecl",
687 FLG_REDECL,
688 "function or variable redeclared",
689 "A function or variable is declared in more than one place. This is "
690 "not necessarily a problem, since the declarations are consistent.",
691 0, 0
692 },
693{
694 FK_DECL, FK_NONE, plainFlag,
695 "redef",
696 FLG_REDEF,
697 "function or variable redefined",
698 "A function or variable is redefined. One of the declarations should use extern.",
699 0, 0
700 },
701{
702 FK_DECL, FK_TYPE, modeFlag,
703 "incondefs",
704 FLG_INCONDEFS,
705 "function, variable or constant redefined with inconsistent type",
706 "A function, variable or constant is redefined with a different type.",
707 0, 0
708 },
709{
710 FK_DECL, FK_TYPE, modeFlag,
711 "imptype",
712 FLG_IMPTYPE,
713 "variable declaration has unknown (implicitly int) type",
714 "A variable declaration has no explicit type. The type is implicitly int.",
715 0, 0
716 },
717{
718 FK_DECL, FK_TYPE, modeFlag,
719 "matchfields",
720 FLG_MATCHFIELDS,
721 "struct or enum type redefined with inconsistent fields or members",
722 "A struct, union or enum type is redefined with inconsistent fields or members.",
723 0, 0
724 },
725{
726 FK_DEF, FK_NONE, modeFlag,
727 "usedef",
728 FLG_USEDEF,
729 "use before definition",
730 "An rvalue is used that may not be initialized to a value on some execution path.",
731 0, 0
732 },
733{
734 FK_DEF, FK_IMPLICIT, modeFlag,
735 "impouts",
736 FLG_IMPOUTS,
737 "pointer parameters to unspecified functions may be implicit out parameters",
738 NULL, 0, 0
739 },
740{
741 FK_DIRECT, FK_FILES, globalStringFlag,
742 "tmpdir",
743 FLG_TMPDIR,
744 "set directory for writing temp files",
745 NULL, 0, 0
746 },
747{
748 FK_DIRECT, FK_FILES, globalStringFlag,
749 "larchpath",
750 FLG_LARCHPATH,
751 "set path for searching for library files (overrides LARCH_PATH environment variable)",
752 NULL, 0, 0
753 },
754{
755 FK_DIRECT, FK_FILES, globalStringFlag,
756 "lclimportdir",
757 FLG_LCLIMPORTDIR,
758 "set directory to search for LCL import files (overrides LCLIMPORTDIR)",
759 NULL, 0, 0
760 },
761{
762 FK_DIRECT, FK_FILES, globalStringFlag,
763 "sysdirs",
764 FLG_SYSTEMDIRS,
765 "set directories for system files (default /usr/include). Separate "
766 "directories with colons (e.g., \"/usr/include:/usr/local/lib\"). "
767 "Flag settings propagate to files in a system directory. If "
768 "-sysdirerrors is set, no errors are reported for files in "
769 "system directories.",
770 NULL, 0, 0
771 },
772{
773 FK_DIRECT, FK_FILES, plainFlag,
774 "skipansiheaders",
775 FLG_SKIPANSIHEADERS,
776 "prevent inclusion of header files in a system directory with "
777 "names that match standard ANSI headers. The symbolic information "
778 "in the standard library is used instead. Flag in effect only "
779 "if a library including the ANSI library is loaded. The ANSI "
780 "headers are: assert, ctype, errno, float, limits, locale, math, "
781 "setjmp, signal, stdarg, stddef, stdio, stdlib, strings, string, "
782 "time, and wchar.",
783 NULL, 0, 0
784 },
785{
786 FK_DIRECT, FK_FILES, plainFlag,
787 "skipposixheaders",
788 FLG_SKIPPOSIXHEADERS,
789 "prevent inclusion of header files in a system directory with "
790 "names that match standard POSIX headers. The symbolic information "
791 "in the posix library is used instead. The POSIX headers are: "
792 "dirent, fcntl, grp, pwd, termios, sys/stat, sys/times, "
793 "sys/types, sys/utsname, sys/wait, unistd, and utime.",
794 NULL, 0, 0
795 },
796{
797 FK_DIRECT, FK_SUPPRESS, modeFlag,
798 "sysdirerrors",
799 FLG_SYSTEMDIRERRORS,
800 "report errors in files in system directories (set by -sysdirs)",
801 NULL, 0, 0
802 },
803{
804 FK_HEADERS, FK_MACROS, plainFlag,
805 "sysdirexpandmacros",
806 FLG_SYSTEMDIREXPAND,
807 "expand macros in system directories regardless of other settings, "
808 "except for macros corresponding to names defined in a load library",
809 NULL, 0, 0
810 },
811
812{
813 FK_DIRECT, FK_HEADERS, globalExtraArgFlag,
814 "I<directory>",
815 FLG_INCLUDEPATH,
816 "add to C include path",
817 NULL, 0, 0
818 },
819{
820 FK_DIRECT, FK_SPEC, globalExtraArgFlag,
821 "S<directory>",
822 FLG_SPECPATH,
823 "add to spec path",
824 NULL, 0, 0
825 },
826{
827 FK_DISPLAY, FK_ERRORS, plainFlag,
828 "quiet",
829 FLG_QUIET,
830 "suppress herald and error count",
831 NULL, 0, 0
832 },
833{
834 FK_DISPLAY, FK_ERRORS, plainFlag,
835 "usestderr",
836 FLG_USESTDERR,
837 "send error messages to standard error (instead of standard out)",
838 NULL, 0, 0
839 },
840{
841 FK_DISPLAY, FK_ERRORS, plainFlag,
842 "showsummary",
843 FLG_SHOWSUMMARY,
844 "show summary of all errors reported and suppressed",
845 NULL, 0, 0
846 },
847{
848 FK_DISPLAY, FK_FILES, plainFlag,
849 "showscan",
850 FLG_SHOWSCAN,
851 "show file names are they are processed",
852 NULL, 0, 0
853 },
854{
855 FK_DISPLAY, FK_NONE, globalFlag,
856 "stats",
857 FLG_STATS,
858 "display lines processed and time",
859 NULL, 0, 0
860 },
861{
862 FK_DISPLAY, FK_NONE, globalFlag,
863 "timedist",
864 FLG_TIMEDIST,
865 "display time distribution",
866 NULL, 0, 0
867 },
868{
869 FK_DISPLAY, FK_USE, globalFlag,
870 "showalluses",
871 FLG_SHOWUSES,
872 "show sorted list of uses of all globals",
873 NULL, 0, 0
874 },
875{
876 FK_EFFECT, FK_CONTROL, modeFlag,
877 "noeffect",
878 FLG_NOEFFECT,
879 "statement with no effect",
880 "Statement has no visible effect --- no values are modified.",
881 0, 0
882 },
883{
884 FK_EFFECT, FK_CONTROL, modeFlag,
885 "noeffectuncon",
886 FLG_NOEFFECTUNCON,
887 "statement with no effect (except possibly through call to "
888 "unconstrained function)",
889 "Statement has no visible effect --- no values are modified. It may "
890 "modify something through a call to an unconstrained function.",
891 0, 0
892 },
893{
894 FK_EXPORT, FK_SPEC, specialFlag,
895 "exportany",
896 FLG_EXPORTANY,
897 "variable, function or type exported but not specified",
898 "A variable, function or type is exported, but not specified.",
899 0, 0
900 },
901{
902 FK_EXPORT, FK_SPEC, modeFlag,
903 "exportfcn",
904 FLG_EXPORTFCN,
905 "function exported but not specified",
906 "A function is exported, but not specified.", 0, 0
907 },
908{
909 FK_EXPORT, FK_SPEC, modeFlag,
910 "exportmacro",
911 FLG_EXPORTMACRO,
912 "expanded macro exported but not specified",
913 "A macro is exported, but not specified.", 0, 0
914 },
915{
916 FK_EXPORT, FK_SPEC, modeFlag,
917 "exporttype",
918 FLG_EXPORTTYPE,
919 "type definition exported but not specified",
920 "A type is exported, but not specified.", 0, 0
921 },
922{
923 FK_EXPORT, FK_SPEC, modeFlag,
924 "exportvar",
925 FLG_EXPORTVAR,
926 "variable exported but not specified",
927 "A variable is exported, but not specified.", 0, 0
928 },
929{
930 FK_EXPORT, FK_SPEC, modeFlag,
931 "exportconst",
932 FLG_EXPORTCONST,
933 "constant exported but not specified",
934 "A constant is exported, but not specified.", 0, 0
935 },
936{
937 FK_EXPORT, FK_SPEC, modeFlag,
938 "exportiter",
939 FLG_EXPORTITER,
940 "constant exported but not specified",
941 "A constant is exported, but not specified.", 0, 0
942 },
943{
944 FK_EXPOSURE, FK_ABSTRACT, specialFlag,
945 "repexpose",
946 FLG_REPEXPOSE,
947 "abstract representation is exposed (sets assignexpose, retexpose, and castexpose)",
948 "The internal representation of an abstract type is visible to the "
949 "caller. This means clients may have access to a pointer "
950 "into the abstract representation.",
951 0, 0
952 },
953{
954 FK_EXPOSURE, FK_ABSTRACT, modeFlag,
955 "retexpose",
956 FLG_RETEXPOSE,
957 "abstract representation is exposed (return values only)",
958 "The return value shares storage with an instance of an abstract "
959 "type. This means clients may have access to a pointer into "
960 "the abstract representation. Use the observer qualifier to "
961 "return exposed storage that may not be modified by the "
962 "client. Use the exposed qualifier to return modifiable "
963 "(but not deallocatable) exposed storage (dangerous).",
964 0, 0
965 },
966{
967 FK_EXPOSURE, FK_ABSTRACT, modeFlag,
968 "assignexpose",
969 FLG_ASSIGNEXPOSE,
970 "abstract representation is exposed (assignments only)",
971 "Storage internal to the representation of an abstract type is "
972 "assigned to an external pointer. This means clients may "
973 "have access to a pointer into the abstract representation. "
974 "If the external pointer is a parameter, the exposed qualifier "
975 "can be used to allow the assignment, however, this is "
976 "considered dangerous programming practice.",
977 0, 0
978 },
979{
980 FK_EXPOSURE, FK_ABSTRACT, modeFlag,
981 "castexpose",
982 FLG_CASTEXPOSE,
983 "abstract representation is exposed through a cast",
984 "Storage internal to the representation of an abstract type is exposed "
985 "through a type cast. This means clients may have access to a "
986 "pointer into the abstract representation.",
987 0, 0
988 },
989
990{
991 FK_FORMAT, FK_DISPLAY, valueFlag,
992 "linelen",
993 FLG_LINELEN,
994 "set length of messages (number of chars)",
995 NULL, 0, 0
996 },
997{
998 FK_FORMAT, FK_DISPLAY, plainFlag,
999 "showcolumn",
1000 FLG_SHOWCOL,
1001 "show column number where error is found",
1002 NULL, 0, 0
1003 },
1004{
1005 FK_FORMAT, FK_DISPLAY, plainFlag,
1006 "parenfileformat",
1007 FLG_PARENFILEFORMAT,
1008 "show column number where error is found",
1009 NULL, 0, 0
1010 },
1011{
1012 FK_FORMAT, FK_NONE, plainFlag,
1013 "showfunc",
1014 FLG_SHOWFUNC,
1015 "show name of function containing error",
1016 NULL, 0, 0
1017 },
1018{
1019 FK_FORMAT, FK_NONE, plainFlag,
1020 "showallconjs",
1021 FLG_SHOWALLCONJS,
1022 "show all possible types",
1023 "When a library function is declared with multiple possible type, the "
1024 "alternate types are shown only if +showallconjs.",
1025 0, 0
1026 },
1027{
1028 FK_LIBS, FK_NONE, plainFlag,
1029 "impconj",
1030 FLG_IMPCONJ,
1031 "make all alternate types implicit (useful for making system libraries",
1032 NULL, 0, 0
1033 } ,
1034{
1035 FK_GLOBAL, FK_ERRORS, globalValueFlag,
1036 "expect",
1037 FLG_EXPECT,
1038 "expect <int> code errors",
1039 NULL, 0, 0
1040 },
1041{
1042 FK_GLOBAL, FK_ERRORS, globalValueFlag,
1043 "lclexpect",
1044 FLG_LCLEXPECT,
1045 "expect <int> spec errors",
1046 NULL, 0, 0
1047 },
1048{
1049 FK_GLOBAL, FK_USE, idemSpecialFlag,
1050 "partial",
1051 FLG_PARTIAL,
1052 "check as partial system (-specundef, -declundef, -exportlocal, "
1053 "don't check macros in headers without corresponding .c files)",
1054 NULL, 0, 0
1055 },
1056{
1057 FK_GLOBALS, FK_SPEC, plainFlag,
1058 "globs",
1059 FLG_GLOBALS,
1060 "undocumented use of a checked global variable",
1061 "A checked global variable is used in the function, but not listed in "
1062 "its globals clause. By default, only globals specified in .lcl "
1063 "files are checked. To check all globals, use +allglobals. To "
1064 "check globals selectively use /*@checked@*/ in the global "
1065 "declaration.",
1066 0, 0
1067 },
1068{
1069 FK_GLOBALS, FK_SPEC, modeFlag,
1070 "globuse",
1071 FLG_USEALLGLOBS,
1072 "global listed for a function not used",
1073 "A global variable listed in the function's globals list is not used "
1074 "in the body of the function.",
1075 0, 0
1076 },
1077{
1078 FK_GLOBALS, FK_NONE, modeFlag,
1079 "internalglobs",
1080 FLG_INTERNALGLOBS,
1081 "use of internalState",
1082 "A called function uses internal state, but the globals list for the "
1083 "function being checked does not include internalState",
1084 0, 0
1085 },
1086{
1087 FK_GLOBALS, FK_NONE, modeFlag,
1088 "internalglobsnoglobs",
1089 FLG_INTERNALGLOBSNOGLOBS,
1090 "use of internalState (in function with no globals list)",
1091 "A called function uses internal state, but the function being checked "
1092 "has no globals list",
1093 0, 0
1094 },
1095{
1096 FK_GLOBALS, FK_MODIFIES, modeFlag,
1097 "warnmissingglobs",
1098 FLG_WARNMISSINGGLOBALS,
1099 "global variable used in modifies clause is not listed in globals list",
1100 "A global variable is used in the modifies clause, but it not listed in "
1101 "the globals list. The variable will be added to the globals list.",
1102 0, 0
1103 },
1104
1105{
1106 FK_GLOBALS, FK_MODIFIES, modeFlag,
1107 "warnmissingglobsnoglobs",
1108 FLG_WARNMISSINGGLOBALSNOGLOBS,
1109 "global variable used in modifies clause in a function with no globals list",
1110 "A global variable is used in the modifies clause, but the function "
1111 "has no globals list. The variable will be added to the globals list.",
1112 0, 0
1113 },
1114{
1115 FK_GLOBALS, FK_UNSPEC, modeFlag,
1116 "globnoglobs",
1117 FLG_GLOBUNSPEC,
1118 "use of checked global in a function with no globals list or specification",
1119 "A specified global variable is used in the function, but not listed "
1120 "in its globals list. Without +globnoglobs, only globals "
1121 "declared with /*@checkedstrict@*/ will produce use "
1122 "errors in functions without globals "
1123 "lists. The /*@globals ... @*/ control comment can be used to give "
1124 "a globals list for an unspecified function.",
1125 0, 0
1126 },
1127{
1128 FK_GLOBALS, FK_IMPLICIT, modeFlag,
1129 "allglobs",
1130 FLG_ALLGLOBALS,
1131 "report use and modification errors for globals not annotated with unchecked",
1132 NULL, 0, 0
1133 },
1134{
1135 FK_GLOBALS, FK_UNSPEC, modeFlag,
1136 "checkstrictglobs",
1137 FLG_CHECKSTRICTGLOBALS,
1138 "report use and modification errors for checkedstrict globals",
1139 NULL, 0, 0
1140 },
1141{
1142 FK_GLOBALS, FK_UNSPEC, modeFlag,
1143 "impcheckedspecglobs",
1144 FLG_IMPCHECKEDSPECGLOBALS,
1145 "assume checked qualifier for unqualified global declarations in .lcl files",
1146 NULL, 0, 0
1147 },
1148{
1149 FK_GLOBALS, FK_UNSPEC, modeFlag,
1150 "impcheckmodspecglobs",
1151 FLG_IMPCHECKMODSPECGLOBALS,
1152 "assume checkmod qualifier for unqualified global declarations in .lcl files",
1153 NULL, 0, 0
1154 },
1155{
1156 FK_GLOBALS, FK_UNSPEC, modeFlag,
1157 "impcheckedstrictspecglobs",
1158 FLG_IMPCHECKEDSTRICTSPECGLOBALS,
1159 "assume checkmod qualifier for unqualified global declarations in .lcl files",
1160 NULL, 0, 0
1161 },
1162{
1163 FK_GLOBALS, FK_UNSPEC, modeFlag,
1164 "impcheckedglobs",
1165 FLG_IMPCHECKEDGLOBALS,
1166 "assume checked qualifier for unqualified global declarations",
1167 NULL, 0, 0
1168 },
1169{
1170 FK_GLOBALS, FK_UNSPEC, modeFlag,
1171 "impcheckmodglobs",
1172 FLG_IMPCHECKMODGLOBALS,
1173 "assume checkmod qualifier for unqualified global declarations",
1174 NULL, 0, 0
1175 },
1176{
1177 FK_GLOBALS, FK_UNSPEC, modeFlag,
1178 "impcheckedstrictglobs",
1179 FLG_IMPCHECKEDSTRICTGLOBALS,
1180 "assume checkedstrict qualifier for unqualified global declarations",
1181 NULL, 0, 0
1182 },
1183{
1184 FK_GLOBALS, FK_UNSPEC, modeFlag,
1185 "impcheckedstatics",
1186 FLG_IMPCHECKEDSTATICS,
1187 "assume checked qualifier for unqualified file static declarations",
1188 NULL, 0, 0
1189 },
1190{
1191 FK_GLOBALS, FK_UNSPEC, modeFlag,
1192 "impcheckmodstatics",
1193 FLG_IMPCHECKMODSTATICS,
1194 "assume checkmod qualifier for unqualified file static declarations",
1195 NULL, 0, 0
1196 },
1197{
1198 FK_GLOBALS, FK_UNSPEC, modeFlag,
1199 "impcheckmodinternals",
1200 FLG_IMPCHECKMODINTERNALS,
1201 "assume checkmod qualifier for unqualified local "
1202 "static declarations (for internal state modifications)",
1203 NULL, 0, 0
1204 },
1205{
1206 FK_GLOBALS, FK_UNSPEC, modeFlag,
1207 "impcheckedstrictstatics",
1208 FLG_IMPCHECKEDSTRICTSTATICS,
1209 "assume checkedstrict qualifier for unqualified file static declarations",
1210 NULL, 0, 0
1211 },
1212{
1213 FK_GLOBALS, FK_MODIFIES, modeFlag,
1214 "modglobs",
1215 FLG_MODGLOBS,
1216 "undocumented modification of a checked global variable",
1217 "A checked global variable is modified by the function, but not listed in "
1218 "its modifies clause.",
1219 0, 0
1220 },
1221{
1222 FK_GLOBALS, FK_MODIFIES, modeFlag,
1223 "modglobsnomods",
1224 FLG_MODGLOBSUNSPEC,
1225 "undocumented modification of a checked global variable in a function "
1226 "declared with no modifies clause",
1227 "A checked global variable is modified by the function, but not listed in "
1228 "its modifies clause.",
1229 0, 0
1230 },
1231{
1232 FK_GLOBALS, FK_MODIFIES, modeFlag,
1233 "modstrictglobsnomods",
1234 FLG_MODSTRICTGLOBSUNSPEC,
1235 "undocumented modification of a strict checked global variable in a "
1236 "function declared with no modifies clause",
1237 "A checked global variable is modified by the function, but not listed in "
1238 "its modifies clause.",
1239 0, 0
1240 },
1241{
1242 FK_GLOBALS, FK_MODIFIES, modeFlag,
1243 "modglobsunchecked",
1244 FLG_MODGLOBSUNCHECKED,
1245 "undocumented modification of an unchecked checked global variable",
1246 "An unchecked global variable is modified by the function, but not listed in "
1247 "its modifies clause.",
1248 0, 0
1249 },
1250{
1251 FK_HEADERS, FK_DEBUG, debugFlag,
1252 "keep",
1253 FLG_KEEP,
1254 NULL, NULL,
1255 0, 0
1256 },
1257{
1258 FK_HEADERS, FK_SPEC, globalFlag,
1259 "lh",
1260 FLG_DOLH,
1261 "generate .lh files", NULL,
1262 0, 0
1263 },
1264{
1265 FK_HEADERS, FK_SPEC, globalFlag,
1266 "lcs",
1267 FLG_DOLCS,
1268 "generate .lcs files", NULL,
1269 0, 0
1270 },
1271{
1272 FK_HEADERS, FK_SPEED, globalFlag,
1273 "singleinclude",
1274 FLG_SINGLEINCLUDE,
1275 "optimize header inclusion to eliminate redundant includes",
1276 "When checking multiple files, each header file is processed only "
1277 "once. This may change the meaning of the code, if the "
1278 "same header file is included in different contexts (e.g., the "
1279 "header file includes #if directives and the values are "
1280 "different when it is included in different places.)",
1281 0, 0
1282 },
1283{
1284 FK_HEADERS, FK_SPEED, globalFlag,
1285 "neverinclude",
1286 FLG_NEVERINCLUDE,
1287 "optimize header inclusion to not include any header files",
1288 "Ignore header includes. Only works if relevant information is "
1289 "loaded from a library.",
1290 0, 0
1291 },
1292{
1293 FK_HEADERS, FK_SPEED, globalFlag,
1294 "skipsysheaders",
1295 FLG_SKIPSYSHEADERS,
1296 "do not include header files in system directories (set by -sysdirs)",
1297 "Do not include header files in system directories (set by -sysdirs)",
1298 0, 0
1299 },
1300{
1301 FK_HELP, FK_NONE, plainFlag,
1302 "warnflags",
1303 FLG_WARNFLAGS,
1304 "warn when command line sets flag to default value in mode",
1305 NULL, 0, 0
1306 },
1307{
1308 FK_HELP, FK_NONE, plainFlag,
1309 "warnunixlib",
1310 FLG_WARNUNIXLIB,
1311 "warn when the unix library is used",
1312 NULL, 0, 0
1313 },
1314{
1315 FK_HELP, FK_NONE, plainFlag,
1316 "badflag",
1317 FLG_BADFLAG,
1318 "a flag is not recognized or used in an incorrect way",
1319 NULL, 0, 0
1320 },
1321{
1322 FK_HELP, FK_NONE, plainFlag,
1323 "forcehints",
1324 FLG_FORCEHINTS,
1325 "provide hints for all errors reported",
1326 NULL, 0, 0
1327 },
1328{
1329 FK_HELP, FK_NONE, globalExtraArgFlag,
1330 "help",
1331 FLG_HELP,
1332 "-help <flags> will describe flags",
1333 NULL, 0, 0
1334 },
1335{
1336 FK_HELP, FK_FORMAT, plainFlag,
1337 "hints",
1338 FLG_HINTS,
1339 "provide hints on using lclint (hint only reported for first related error)",
1340 NULL, 0, 0
1341 },
1342{
1343 FK_IGNORERET, FK_NONE, specialFlag,
1344 "retval",
1345 FLG_RETVAL,
1346 "return value ignored (sets retvalint, retvalbool and retvalother)",
1347 "Result returned by function call is not used. If this is intended, "
1348 "cast result to (void) to eliminate message.",
1349 0, 0
1350 },
1351{
1352 FK_IGNORERET, FK_BOOL, modeFlag,
1353 "retvalother",
1354 FLG_RETVALOTHER,
1355 "return value of type other than bool or int ignored",
1356 "Result returned by function call is not used. If this is intended, "
1357 "can cast result to (void) to eliminate message.",
1358 0, 0
1359 },
1360{
1361 FK_IGNORERET, FK_BOOL, modeFlag,
1362 "retvalbool",
1363 FLG_RETVALBOOL,
a0a162cd 1364 "return value of manifest type bool ignored",
885824d3 1365 "Result returned by function call is not used. If this is intended, "
1366 "can cast result to (void) to eliminate message.",
1367 0, 0
1368 },
1369{
1370 FK_IGNORERET, FK_NONE, modeFlag,
1371 "retvalint",
1372 FLG_RETVALINT,
1373 "return value of type int ignored",
1374 "Result returned by function call is not used. If this is intended, "
1375 "can cast result to (void) to eliminate message.",
1376 0, 0
1377 },
1378{
1379 FK_INIT, FK_FILES, globalExtraArgFlag,
1380 "f",
1381 FLG_OPTF,
1382 "load options file (default ~/.lclintrc not loaded)",
1383 NULL, 0, 0
1384 },
1385{
1386 FK_INIT, FK_FILES, globalExtraArgFlag,
1387 "i",
1388 FLG_INIT,
1389 "set LCL initilization file",
1390 NULL, 0, 0
1391 },
1392{
1393 FK_INIT, FK_FILES, globalFlag,
1394 "nof",
1395 FLG_NOF,
1396 "do not read options file",
1397 NULL, 0, 0
1398 },
1399{
1400 FK_INIT, FK_SPEC, plainFlag,
1401 "needspec",
1402 FLG_NEEDSPEC,
1403 "information in specifications is not also included in syntactic comments",
1404 "There is information in the specification that is not duplicated "
1405 "in syntactic comments. Normally, this is not an "
1406 "error, but it may be useful to detect it to make "
1407 "sure checking incomplete systems without the specifications will "
1408 "still use this information.",
1409 0, 0
1410 },
1411{
1412 FK_DECL, FK_LIBS, plainFlag,
1413 "newdecl",
1414 FLG_NEWDECL,
1415 "report new global declarations in source files",
1416 "There is a new declaration that is not declared in a loaded library "
1417 "or earlier file. (Use this flag to check for consistency "
1418 "against a library.)",
1419 0, 0
1420 },
1421{
1422 FK_ITER, FK_NONE, plainFlag,
1423 "iter",
1424 FLG_ITER,
1425 NULL, NULL,
1426 0, 0
1427 },
1428{
1429 FK_ITER, FK_NONE, plainFlag,
1430 "hasyield",
1431 FLG_HASYIELD,
1432 "iter declaration has no yield parameters",
1433 "An iterator has been declared with no parameters annotated with "
1434 "yield. This may be what you want, if the iterator is meant "
1435 "to do something a fixed number of times, but returns no "
1436 "information to the calling context. Probably, a parameter "
1437 "is missing the yield annotation to indicate that it is "
1438 "assigned a value in the calling context.",
1439 0, 0
1440 },
1441{
1442 FK_LIBS, FK_FILES, globalStringFlag,
1443 "dump",
1444 FLG_DUMP,
1445 "save state for merging (default suffix .lcd)",
1446 NULL, 0, 0
1447 },
1448{
1449 FK_LIBS, FK_FILES, globalStringFlag,
1450 "load",
1451 FLG_MERGE,
1452 "load state from dump file (default suffix .lcd)",
1453 NULL, 0, 0
1454 },
1455{
1456 FK_LIBS, FK_INIT, idemGlobalFlag,
1457 "nolib",
1458 FLG_NOLIB,
1459 "do not load standard library",
1460 NULL, 0, 0
1461 },
1462{
1463 FK_LIBS, FK_INIT, globalFlag,
1464 "ansilib",
1465 FLG_ANSILIB,
1466 "use ANSI (ISO) standard library",
1467 "Library based on the ANSI standard library specification is used.",
1468 0, 0
1469 },
1470{
1471 FK_LIBS, FK_INIT, globalFlag,
1472 "strictlib",
1473 FLG_STRICTLIB,
1474 "interpret standard library strictly",
1475 "Stricter version of the standard library is used. (The default "
1476 "library is standard.lcd; strict library is strict.lcd.)",
1477 0, 0
1478 },
1479{
1480 FK_LIBS, FK_INIT, globalFlag,
1481 "unixlib",
1482 FLG_UNIXLIB,
1483 "use UNIX (sort-of) standard library",
1484 "UNIX version of the standard library is used.",
1485 0, 0
1486 },
1487{
1488 FK_LIBS, FK_INIT, globalFlag,
1489 "unixstrictlib",
1490 FLG_UNIXSTRICTLIB,
1491 "use strict version of UNIX (sort-of) library",
1492 "strict version of the UNIX library is used.",
1493 0, 0
1494 },
1495{
1496 FK_LIBS, FK_INIT, globalFlag,
1497 "posixlib",
1498 FLG_POSIXLIB,
1499 "use POSIX standard library",
1500 "POSIX version of the standard library is used.",
1501 0, 0
1502 },
1503{
1504 FK_LIBS, FK_INIT, globalFlag,
1505 "posixstrictlib",
1506 FLG_POSIXSTRICTLIB,
1507 "use strict POSIX standard library",
1508 "POSIX version of the strict standard library is used.",
1509 0, 0
1510 },
1511{
1512 FK_LIBS, FK_INIT, globalFlag,
1513 "whichlib",
1514 FLG_WHICHLIB,
1515 "show standard library filename",
1516 NULL, 0, 0
1517 },
1518{
1519 FK_INIT, FK_COMMENTS, valueFlag,
1520 "commentchar",
1521 FLG_COMMENTCHAR,
1522 "set marker character for syntactic comments (default is '@')",
1523 "Set the marker character for syntactic comments. Comments beginning "
1524 "with /*<char> are interpreted by lclint, where <char> is the "
1525 "comment marker character.",
1526 0, 0
1527 },
1528{
1529 FK_MACROS, FK_NONE, plainSpecialFlag,
1530 "allmacros",
1531 FLG_ALLMACROS,
1532 "sets fcnmacros and constmacros",
1533 "All macros (not preceded by /*@notfunction@*/) are checked as functions or "
1534 "constants depending on whether or not they have parameter lists.",
1535 0, 0
1536 },
1537{
1538 FK_MACROS, FK_NONE, plainFlag,
1539 "libmacros",
1540 FLG_LIBMACROS,
1541 "check all macros with declarations in library as functions",
1542 "Every macro declared in the load library is checked.",
1543 0, 0
1544 },
1545{
1546 FK_MACROS, FK_NONE, plainFlag,
1547 "specmacros",
1548 FLG_SPECMACROS,
1549 "check all macros corresponding to specified functions or constants",
1550 "Every macro declared a specification file is checked.",
1551 0, 0
1552 },
1553{
1554 FK_MACROS, FK_NONE, plainFlag,
1555 "fcnmacros",
1556 FLG_FCNMACROS,
1557 "check all macros with parameter lists as functions",
1558 "Every parameterized macro (not preceded by /*@notfunction@*/) "
1559 "is checked as a function.",
1560 0, 0
1561 },
1562{
1563 FK_MACROS, FK_NONE, plainFlag,
1564 "constmacros",
1565 FLG_CONSTMACROS,
1566 "check all macros without parameter lists as constants",
1567 "Every non-parameterized macro (not preceded by /*@notfunction@*/) "
1568 "is checked as a constant.",
1569 0, 0
1570 },
1571{
1572 FK_MACROS, FK_NONE, modeFlag,
1573 "macromatchname",
1574 FLG_MACROMATCHNAME,
1575 "macro definition does not match iter or constant declaration",
1576 "A iter or constant macro is defined using a different name from the "
1577 "one used in the previous syntactic comment",
1578 0, 0
1579 },
1580{
1581 FK_MACROS, FK_NONE, plainFlag,
1582 "nextlinemacros",
1583 FLG_MACRONEXTLINE,
1584 "the line after a constant or iter declaration must be a macro definition",
1585 "A constant or iter declaration is not immediately followed by a macro definition.",
1586 0, 0
1587 },
1588{
1589 FK_MACROS, FK_NONE, modeFlag,
1590 "macrostmt",
1591 FLG_MACROSTMT,
1592 "macro definition is syntactically not equivalent to function",
1593 "A macro is defined in a way that may cause syntactic problems. If the macro returns a value, use commas to separate expressions; otherwise, use do { <macro body> } while (FALSE) construct.",
1594 0, 0
1595 },
1596{
1597 FK_MACROS, FK_NONE, modeFlag,
1598 "macroempty",
1599 FLG_MACROEMPTY,
1600 "macro definition for is empty",
1601 "A macro definition has no body.",
1602 0, 0
1603 },
1604{
1605 FK_MACROS, FK_PARAMS, modeFlag,
1606 "macroparams",
1607 FLG_MACROPARAMS,
1608 "macro parameter not used exactly once",
1609 "A macro parameter is not used exactly once in all possible "
1610 "invocations of the macro. To behave like a function, "
1611 "each macro parameter must be used exactly once on all "
1612 "invocations of the macro so that parameters with "
1613 "side-effects are evaluated exactly once. Use /*@sef@*/ to "
1614 "denote parameters that must be side-effect free.",
1615 0, 0
1616 },
1617{
1618 FK_MACROS, FK_PARAMS, modeFlag,
1619 "macroassign",
1620 FLG_MACROASSIGN,
1621 "assignment to a macro parameter",
1622 "A macro parameter is used as the left side of an "
1623 "assignment expression. This exhibits behavior that "
1624 "could not be implemented by a function.",
1625 0, 0
1626 },
1627{
1628 FK_MACROS, FK_PARAMS, modeFlag,
1629 "sefparams",
1630 FLG_SEFPARAMS,
1631 "a parameter with side-effects is passed as a sef parameter",
1632 "An actual parameter corresponding to a sef parameter may have a side-effect.",
1633 0, 0
1634 },
1635{
1636 FK_MACROS, FK_PARAMS, modeFlag,
1637 "sefuncon",
1638 FLG_SEFUNSPEC,
1639 "a parameter with unconstrained side-effects is passed as a sef parameter",
1640 "An actual parameter corresponding to a sef parameter involves a call "
1641 "to a procedure with no modifies clause that may have a side-effect.",
1642 0, 0
1643 },
1644{
1645 FK_MACROS, FK_NONE, modeFlag,
1646 "macroparens",
1647 FLG_MACROPARENS,
1648 "macro parameter used without parentheses (in potentially dangerous context)",
1649 "A macro parameter is used without parentheses. This could be "
1650 "dangerous if the macro is invoked with a complex expression "
1651 "and precedence rules will change the evaluation inside the macro.",
1652 0, 0
1653 },
1654{
1655 FK_MACROS, FK_PROTOS, modeFlag,
1656 "macrodecl",
1657 FLG_MACRODECL,
1658 "macro without prototype or specification (sets macrofcndecl and macroconstdecl)",
1659 "Argument checking cannot be done well for macros without prototypes "
1660 "or specifications, since the types of the arguments are unknown.",
1661 0, 0
1662 },
1663{
1664 FK_MACROS, FK_PROTOS, modeFlag,
1665 "macrofcndecl",
1666 FLG_MACROFCNDECL,
1667 "parameterized macro without prototype or specification",
1668 "Function macro has no declaration.",
1669 0, 0
1670 },
1671{
1672 FK_MACROS, FK_PROTOS, modeFlag,
1673 "macroconstdecl",
1674 FLG_MACROCONSTDECL,
1675 "non-parameterized macro without prototype or specification",
1676 "Macro constant has no declaration. Use /*@constant ...@*/ to "
1677 "declare the macro.",
1678 0, 0
1679 },
1680{
1681 FK_MACROS, FK_NONE, modeFlag,
1682 "macroredef",
1683 FLG_MACROREDEF,
1684 "macro redefined",
1685 "A macro is defined in more than one place.", 0, 0
1686 },
1687{
1688 FK_MACROS, FK_UNRECOG, modeFlag,
1689 "macrounrecog",
1690 FLG_MACROUNDEF,
1691 "unrecognized identifier in macro",
1692 "An unrecognized identifier appears in a macro. If the identifier "
1693 "is defined before the macro is used, then this is okay.",
1694 0, 0
1695 },
1696{
1697 FK_MEMORY, FK_DEAD, modeFlag,
1698 "stackref",
1699 FLG_RETSTACK,
1700 "external reference to stack-allocated storage is created",
1701 "A stack reference is pointed to by an external reference when the "
1702 "function returns. The stack-allocated storage is destroyed "
1703 "after the call, leaving a dangling reference.",
1704 0, 0
1705 },
1706{
1707 FK_MEMORY, FK_DEAD, modeFlag,
1708 "usereleased",
1709 FLG_USERELEASED,
1710 "storage used after release",
1711 "Memory is used after it has been released (either by passing "
1712 "as an only param or assigning to and only global.",
1713 0, 0
1714 },
1715{
1716 FK_MEMORY, FK_DEAD, modeFlag,
1717 "strictusereleased",
1718 FLG_STRICTUSERELEASED,
1719 "element used after it may have been released",
1720 "Memory (through fetch) is used after it may have been released "
1721 "(either by passing as an only param or assigning to and only global.",
1722 0, 0
1723 },
1724{
1725 FK_MEMORY, FK_DEF, modeFlag,
1726 "compdef",
1727 FLG_COMPDEF,
1728 "parameter, return value or global completely defined",
1729 "Storage derivable from a parameter, return value or global is "
1730 "not defined. Use /*@out@*/ to denote passed or returned "
1731 "storage which need not be defined.",
1732 0, 0
1733 },
1734{
1735 FK_MEMORY, FK_DEF, modeFlag,
1736 "compmempass",
1737 FLG_COMPMEMPASS,
1738 "actual parameter matches alias kind of formal parameter completely ",
1739 "Storage derivable from a parameter does not match the alias kind "
1740 "expected for the formal parameter.",
1741 0, 0
1742 },
1743{
1744 FK_MEMORY, FK_DEF, modeFlag,
1745 "mustdefine",
1746 FLG_MUSTDEFINE,
1747 "out storage not defined before return or scope exit",
1748 "An out parameter or global is not defined before control is transferred.",
1749 0, 0
1750 },
1751{
1752 FK_MEMORY, FK_DEF, modeFlag,
1753 "uniondef",
1754 FLG_UNIONDEF,
1755 "at least one field of a union must be defined",
1756 "No field of a union is defined. Generally, one field of a union is "
1757 "expected to be defined.",
1758 0, 0
1759 },
1760{
1761 FK_MEMORY, FK_IMPLICIT, modeFlag,
1762 "memimp",
1763 FLG_MEMIMPLICIT,
1764 "memory errors for unqualified storage",
1765 NULL, 0, 0
1766 },
1767{
1768 FK_MEMORY, FK_IMPLICIT, plainFlag,
1769 "paramimptemp",
1770 FLG_PARAMIMPTEMP,
1771 "assume unannotated parameter is temp",
1772 NULL, 0, 0
1773 },
1774{
1775 FK_MEMORY, FK_IMPLICIT, specialFlag,
1776 "allimponly",
1777 FLG_ALLIMPONLY,
1778 "sets globimponly, retimponly, structimponly, specglobimponly, "
1779 "specretimponly and specstructimponly",
1780 NULL, 0, 0
1781 },
1782{
1783 FK_MEMORY, FK_IMPLICIT, specialFlag,
1784 "codeimponly",
1785 FLG_CODEIMPONLY,
1786 "sets globimponly, retimponly and structimponly",
1787 NULL, 0, 0
1788 },
1789{
1790 FK_MEMORY, FK_IMPLICIT, specialFlag,
1791 "specimponly",
1792 FLG_SPECALLIMPONLY,
1793 "sets specglobimponly, specretimponly and specstructimponly",
1794 NULL, 0, 0
1795 },
1796{
1797 FK_MEMORY, FK_IMPLICIT, plainFlag,
1798 "globimponly",
1799 FLG_GLOBIMPONLY,
1800 "assume unannotated global storage is only",
1801 NULL, 0, 0
1802 },
1803{
1804 FK_MEMORY, FK_IMPLICIT, plainFlag,
1805 "retimponly",
1806 FLG_RETIMPONLY,
1807 "assume unannotated returned storage is only",
1808 NULL, 0, 0
1809 },
1810{
1811 FK_MEMORY, FK_IMPLICIT, plainFlag,
1812 "structimponly",
1813 FLG_STRUCTIMPONLY,
1814 "assume unannotated structure field is only",
1815 NULL, 0, 0
1816 },
1817{
1818 FK_MEMORY, FK_IMPLICIT, plainFlag,
1819 "specglobimponly",
1820 FLG_SPECGLOBIMPONLY,
1821 "assume unannotated global storage is only",
1822 NULL, 0, 0
1823 },
1824{
1825 FK_MEMORY, FK_IMPLICIT, plainFlag,
1826 "specretimponly",
1827 FLG_SPECRETIMPONLY,
1828 "assume unannotated returned storage is only",
1829 NULL, 0, 0
1830 },
1831{
1832 FK_MEMORY, FK_IMPLICIT, plainFlag,
1833 "specstructimponly",
1834 FLG_SPECSTRUCTIMPONLY,
1835 "assume unannotated structure field is only",
1836 NULL, 0, 0
1837 },
1838{
1839 FK_MEMORY, FK_ARRAY, modeFlag,
1840 "deparrays",
1841 FLG_DEPARRAYS,
1842 "array elements are dependent storage",
1843 "When an element is fetched from an array, lclint analysis is "
1844 "not able to determine if the same element is reused. "
1845 "If +deparrays, lclint will mark local storage assigned from "
1846 "array fetches as dependent.",
1847 0, 0
1848 },
1849{
1850 FK_MEMORY, FK_LEAK, modeFlag,
1851 "compdestroy",
1852 FLG_COMPDESTROY,
1853 "all only references derivable from void pointer out only parameter are released",
1854 "A storage leak due to incomplete deallocation of a structure or deep "
1855 "pointer is suspected. Unshared storage that is reachable from "
1856 "a reference that is being deallocated has not yet been deallocated. "
1857 "LCLint assumes when an object is passed "
1858 "as an out only void pointer that the outer object will be "
1859 "deallocated, but the inner objects will not.",
1860 0, 0
1861 },
1862{
1863 FK_MEMORY, FK_LEAK, modeFlag,
1864 "strictdestroy",
1865 FLG_STRICTDESTROY,
1866 "report complete destruction errors for array elements that "
1867 "may have been released",
1868 NULL,
1869 0, 0
1870 },
1871{
1872 FK_MEMORY, FK_LEAK, modeFlag,
1873 "mustfree",
1874 FLG_MUSTFREE,
1875 "only storage not released before return or scope exit",
1876 "A memory leak has been detected. Newly-allocated or "
1877 "only-qualified storage is not released before the last "
1878 "reference to it is lost.",
1879 0, 0
1880 },
1881{
1882 FK_MEMORY, FK_NONE, modeFlag,
1883 "branchstate",
1884 FLG_BRANCHSTATE,
1885 "storage has inconsistent states of alternate paths through a branch",
1886 "The state of a variable is different depending on which branch "
1887 "is taken. This means no annotation can sensibly be applied "
1888 "to the storage.",
1889 0, 0
1890 },
1891{
1892 FK_MEMORY, FK_NONE, modeFlag,
1893 "strictbranchstate",
1894 FLG_STRICTBRANCHSTATE,
1895 "storage through array fetch has inconsistent states of alternate "
1896 "paths through a branch",
1897 "The state of a variable through an array fetch is different depending "
1898 "on which branch is taken. This means no annotation can sensibly be applied "
1899 "to the storage.",
1900 0, 0
1901 },
1902{
1903 FK_MEMORY, FK_NONE, specialFlag,
1904 "memchecks",
1905 FLG_MEMCHECKS,
1906 "sets all dynamic memory checking flags (memimplicit, mustfree, mustdefine, "
1907 "mustnotalias, null, memtrans)",
1908 NULL, 0, 0
1909 },
1910{
1911 FK_MEMORY, FK_NONE, specialFlag,
1912 "memtrans",
1913 FLG_MEMTRANS,
1914 "memory transfer errors (sets all *trans flags)",
1915 "Memory is transferred in a way that violates annotations.",
1916 0, 0
1917 },
1918{
1919 FK_MEMORY, FK_NONE, modeFlag,
1920 "exposetrans",
1921 FLG_EXPOSETRANS,
1922 "exposure transfer errors",
1923 "Exposed storage is transferred to a non-exposed, non-observer reference.",
1924 0, 0
1925 },
1926{
1927 FK_MEMORY, FK_NONE, modeFlag,
1928 "observertrans",
1929 FLG_OBSERVERTRANS,
1930 "observer transfer errors",
1931 "Observer storage is transferred to a non-observer reference.",
1932 0, 0
1933 },
1934{
1935 FK_MEMORY, FK_NONE, modeFlag,
1936 "dependenttrans",
1937 FLG_DEPENDENTTRANS,
1938 "dependent transfer errors",
1939 "Dependent storage is transferred to a non-dependent reference.",
1940 0, 0
1941 },
1942{
1943 FK_MEMORY, FK_NONE, modeFlag,
1944 "newreftrans",
1945 FLG_NEWREFTRANS,
1946 "new reference transfer to reference counted reference",
1947 "A new reference is transferred to a reference counted reference.",
1948 0, 0
1949 },
1950{
1951 FK_MEMORY, FK_NONE, modeFlag,
1952 "onlytrans",
1953 FLG_ONLYTRANS,
1954 "only storage transferred to non-only reference (memory leak)",
1955 "The only reference to this storage is transferred to another "
1956 "reference (e.g., by returning it) that does not have the "
1957 "only annotation. This may lead to a memory leak, since the "
1958 "new reference is not necessarily released.",
1959 0, 0
1960 },
1961{
1962 FK_MEMORY, FK_NONE, modeFlag,
1963 "onlyunqglobaltrans",
1964 FLG_ONLYUNQGLOBALTRANS,
1965 "only storage transferred to an unqualified global or "
1966 "static reference (memory leak)",
1967 "The only reference to this storage is transferred to another "
1968 "reference that does not have an aliasing annotation. "
1969 "This may lead to a memory leak, since the "
1970 "new reference is not necessarily released.",
1971 0, 0
1972 },
1973{
1974 FK_MEMORY, FK_NONE, modeFlag,
1975 "ownedtrans",
1976 FLG_OWNEDTRANS,
1977 "owned storage transferred to non-owned reference (memory leak)",
1978 "The owned reference to this storage is transferred to another "
1979 "reference (e.g., by returning it) that does not have the "
1980 "owned annotation. This may lead to a memory leak, since the "
1981 "new reference is not necessarily released.",
1982 0, 0
1983 },
1984{
1985 FK_MEMORY, FK_NONE, modeFlag,
1986 "freshtrans",
1987 FLG_FRESHTRANS,
1988 "fresh storage transferred to non-only reference (memory leak)",
1989 "Fresh storage (newly allocated in this function) is transferred "
1990 "in a way that the obligation to release storage is not "
1991 "propagated. Use the /*@only@*/ annotation to indicate "
1992 "the a return value is the only reference to the returned "
1993 "storage.",
1994 0, 0
1995 },
1996{
1997 FK_MEMORY, FK_NONE, modeFlag,
1998 "sharedtrans",
1999 FLG_SHAREDTRANS,
2000 "shared storage transferred to non-shared reference",
2001 "Shared storage is transferred to a non-shared reference. The other "
2002 "reference may release storage needed by this reference.",
2003 0, 0
2004 },
2005{
2006 FK_MEMORY, FK_NONE, modeFlag,
2007 "temptrans",
2008 FLG_TEMPTRANS,
2009 "temp storage transferred to non-temporary reference",
2010 "Temp storage (associated with a formal parameter) is transferred "
2011 "to a non-temporary reference. The storage may be released "
2012 "or new aliases created.",
2013 0, 0
2014 },
2015{
2016 FK_MEMORY, FK_NONE, modeFlag,
2017 "kepttrans",
2018 FLG_KEPTTRANS,
2019 "kept storage transferred to non-temporary reference",
2020 "Kept storage is transferred "
2021 "to a non-temporary reference. The storage may be released "
2022 "or new aliases created.",
2023 0, 0
2024 },
2025{
2026 FK_MEMORY, FK_NONE, modeFlag,
2027 "keeptrans",
2028 FLG_KEEPTRANS,
2029 "keep storage transferred inconsistently",
2030 "Keep storage is transferred inconsistently --- either in a way "
2031 "that may add a new alias to it, or release it.",
2032 0, 0
2033 },
2034{
2035 FK_MEMORY, FK_NONE, modeFlag,
2036 "immediatetrans",
2037 FLG_IMMEDIATETRANS,
2038 "an immediate address (result of &) is transferred inconsistently",
2039 "An immediate address (result of & operator) is transferred "
2040 "inconsistently.",
2041 0, 0
2042 },
2043{
2044 FK_MEMORY, FK_NONE, modeFlag,
2045 "refcounttrans",
2046 FLG_REFCOUNTTRANS,
2047 "reference counted storage is transferred in an inconsistent way",
2048 "Reference counted storage is transferred in a way that may not "
2049 "be consistent with the reference count.",
2050 0, 0
2051 },
2052{
2053 FK_MEMORY, FK_NONE, modeFlag,
2054 "statictrans",
2055 FLG_STATICTRANS,
2056 "static storage is transferred in an inconsistent way",
2057 "Static storage is transferred in an inconsistent way.",
2058 0, 0
2059 },
2060{
2061 FK_MEMORY, FK_NONE, modeFlag,
2062 "unqualifiedtrans",
2063 FLG_UNKNOWNTRANS,
2064 "unqualified storage is transferred in an inconsistent way",
2065 "Unqualified storage is transferred in an inconsistent way.",
2066 0, 0
2067 },
2068{
2069 FK_MEMORY, FK_NONE, modeFlag,
2070 "staticinittrans",
2071 FLG_STATICINITTRANS,
2072 "static storage is used as an initial value in an inconsistent way",
2073 "Static storage is used as an initial value in an inconsistent way.",
2074 0, 0
2075 },
2076{
2077 FK_MEMORY, FK_NONE, modeFlag,
2078 "unqualifiedinittrans",
2079 FLG_UNKNOWNINITTRANS,
2080 "unqualified storage is used as an initial value in an inconsistent way",
2081 "Unqualified storage is used as an initial value in an inconsistent way.",
2082 0, 0
2083 },
2084{
2085 FK_MEMORY, FK_NONE, modeFlag,
2086 "readonlystrings",
2087 FLG_READONLYSTRINGS,
2088 "string literals are read-only (error if one is modified or released)",
2089 "String literals are read-only (ANSI semantics). An error is reported "
2090 "if a string literal may be modified or released.",
2091 0, 0
2092 },
2093{
2094 FK_MEMORY, FK_NONE, modeFlag,
2095 "readonlytrans",
2096 FLG_READONLYTRANS,
2097 "report memory transfer errors for initializations to read-only string literals",
2098 "A read-only string literal is assigned to a non-observer reference.",
2099 0, 0
2100 },
2101{
2102 FK_MEMORY, FK_PARAMS, modeFlag,
2103 "passunknown",
2104 FLG_PASSUNKNOWN,
2105 "passing a value as an un-annotated parameter clears its annotation",
2106 NULL, 0, 0
2107 },
2108{
2109 FK_MODIFIES, FK_SPEC, plainFlag,
2110 "mods",
2111 FLG_MODIFIES,
2112 "unspecified modification of caller-visible state",
2113 "An externally-visible object is modified by a function, but not "
2114 "listed in its modifies clause.",
2115 0, 0
2116 },
2117{
2118 FK_MODIFIES, FK_SPEC, modeFlag,
2119 "mustmod",
2120 FLG_MUSTMOD,
2121 "specified modification is not detected",
2122 "An object listed in the modifies clause is not modified by the "
2123 "implementation of the function. The modification may not "
2124 "be detected if it is done through a call to an unspecified "
2125 "function.",
2126 0, 0
2127 },
2128{
2129 FK_MODIFIES, FK_MEMORY, plainFlag,
2130 "modobserver",
2131 FLG_MODOBSERVER,
2132 "possible modification of observer storage",
2133 "Storage declared with observer is possibly modified. Observer "
2134 "storage may not be modified.",
2135 0, 0
2136 },
2137{
2138 FK_MODIFIES, FK_MEMORY, modeFlag,
2139 "modobserveruncon",
2140 FLG_MODOBSERVERUNCON,
2141 "possible modification of observer storage through unconstrained call",
2142 "Storage declared with observer may be modified through a call to an "
2143 "unconstrained function.",
2144 0, 0
2145 },
2146{
2147 FK_MODIFIES, FK_MEMORY, modeFlag,
2148 "modinternalstrict",
2149 FLG_MODINTERNALSTRICT,
2150 "possible modification of internal storage through function call",
2151 "A function that modifies internalState is called from a function that "
2152 "does not list internalState in its modifies clause",
2153 0, 0
2154 },
2155{
2156 FK_MODIFIES, FK_UNSPEC, modeFlag,
2157 "modfilesys",
2158 FLG_MODFILESYSTEM,
2159 "report undocumented file system modifications (applies to unspecified "
2160 "functions if modnomods is set)",
2161 NULL, 0, 0
2162 },
2163{
2164 FK_MODIFIES, FK_UNSPEC, specialFlag,
2165 "modunspec",
2166 FLG_MODUNSPEC,
2167 "modification in unspecified functions (sets modnomods, "
2168 "modglobunspec and modstrictglobsunspec)",
2169 NULL, 0, 0
2170 },
2171{
2172 FK_MODIFIES, FK_UNSPEC, modeFlag,
2173 "modnomods",
2174 FLG_MODNOMODS,
2175 "modification in a function with no modifies clause",
2176 "An externally-visible object is modified by a function with no "
2177 "/*@modifies@*/ comment. The /*@modifies ... @*/ control "
2178 "comment can be used to give a modifies list for an "
2179 "unspecified function.",
2180 0, 0
2181 },
2182{
2183 FK_MODIFIES, FK_UNSPEC, modeFlag,
2184 "moduncon",
2185 FLG_MODUNCON,
2186 "possible modification through a call to an unconstrained function",
2187 "An unconstrained function is called in a function body where "
2188 "modifications are checked. Since the unconstrained function "
2189 "may modify anything, there may be undetected modifications in "
2190 "the checked function.",
2191 0, 0
2192 },
2193{
2194 FK_MODIFIES, FK_UNSPEC, modeFlag,
2195 "modunconnomods",
2196 FLG_MODUNCONNOMODS,
2197 "possible modification through a call to an unconstrained function in "
2198 "a function with no modifies clause",
2199 "An unconstrained function is called in a function body where "
2200 "modifications are checked. Since the unconstrained function "
2201 "may modify anything, there may be undetected modifications in "
2202 "the checked function.",
2203 0, 0
2204 },
2205{
2206 FK_MODIFIES, FK_GLOBALS, modeFlag,
2207 "globsimpmodsnothing",
2208 FLG_GLOBALSIMPMODIFIESNOTHING,
2209 "functions declared with a globals list but no modifies clause are "
2210 "assumed to modify nothing",
2211 "An implicit modifies nothing clause is assumed for a function "
2212 "declared with a globals list but not modifies clause.",
2213 0, 0
2214 },
2215{
2216 FK_MODIFIES, FK_GLOBALS, modeFlag,
2217 "modsimpnoglobs",
2218 FLG_MODIFIESIMPNOGLOBALS,
2219 "functions declared with a modifies clause but no globals list "
2220 "are assumed to use no globals",
2221 "An implicit empty globals list is assumed for a function "
2222 "declared with a modifies clause but no globals list.",
2223 0, 0
2224 },
2225{
2226 FK_NAMES, FK_ABSTRACT, plainFlag,
2227 "namechecks",
2228 FLG_NAMECHECKS,
2229 "controls name checking without changing other settings",
2230 NULL, 0, 0
2231 },
2232{
2233 FK_NAMES, FK_ABSTRACT, specialFlag,
2234 "czech",
2235 FLG_CZECH,
2236 "czech naming convention (sets accessczech, czechfunctions, czechvars, "
2237 "czechconstants, czechenums, and czechmacros)",
2238 "Name is not consistent with Czech naming convention.", 0, 0
2239 },
2240{
2241 FK_NAMES, FK_ABSTRACT, plainFlag,
2242 "czechfcns",
2243 FLG_CZECHFUNCTIONS,
2244 "czech naming convention violated in a function or iterator declaration",
2245 "Function or iterator name is not consistent with Czech naming convention.", 0, 0
2246 },
2247{
2248 FK_NAMES, FK_ABSTRACT, plainFlag,
2249 "czechvars",
2250 FLG_CZECHVARS,
2251 "czech naming convention violated in a variable declaration",
2252 "Variable name is not consistent with Czech naming convention.", 0, 0
2253 },
2254{
2255 FK_NAMES, FK_ABSTRACT, plainFlag,
2256 "czechmacros",
2257 FLG_CZECHMACROS,
2258 "czech naming convention violated in an expanded macro name",
2259 "Expanded macro name is not consistent with Czech naming convention.", 0, 0
2260 },
2261{
2262 FK_NAMES, FK_ABSTRACT, plainFlag,
2263 "czechconsts",
2264 FLG_CZECHCONSTANTS,
2265 "czech naming convention violated in a constant declaration",
2266 "Constant name is not consistent with Czech naming convention.", 0, 0
2267 },
2268{
2269 FK_NAMES, FK_ABSTRACT, plainFlag,
2270 "czechtypes",
2271 FLG_CZECHTYPES,
2272 "czech naming convention violated in a user-defined type definition",
2273 "Type name is not consistent with Czech naming convention. Czech type "
2274 "names must not use the underscore character.", 0, 0
2275 },
2276{
2277 FK_NAMES, FK_ABSTRACT, specialFlag,
2278 "slovak",
2279 FLG_SLOVAK,
2280 "slovak naming convention violated",
2281 "Name is not consistent with Slovak naming convention.", 0, 0
2282 },
2283{
2284 FK_NAMES, FK_ABSTRACT, plainFlag,
2285 "slovakfcns",
2286 FLG_SLOVAKFUNCTIONS,
2287 "slovak naming convention violated in a function or iterator declaration",
2288 "Function or iterator name is not consistent with Slovak naming convention.", 0, 0
2289 },
2290{
2291 FK_NAMES, FK_ABSTRACT, plainFlag,
2292 "slovakmacros",
2293 FLG_SLOVAKMACROS,
2294 "slovak naming convention violated in an expanded macro name",
2295 "Expanded macro name is not consistent with Slovak naming convention.", 0, 0
2296 },
2297{
2298 FK_NAMES, FK_ABSTRACT, plainFlag,
2299 "slovakvars",
2300 FLG_SLOVAKVARS,
2301 "slovak naming convention violated in a variable declaration",
2302 "Variable name is not consistent with Slovak naming convention.", 0, 0
2303 },
2304{
2305 FK_NAMES, FK_ABSTRACT, plainFlag,
2306 "slovakconsts",
2307 FLG_SLOVAKCONSTANTS,
2308 "slovak naming convention violated in a constant declaration",
2309 "Constant name is not consistent with Slovak naming convention.", 0, 0
2310 },
2311{
2312 FK_NAMES, FK_ABSTRACT, plainFlag,
2313 "slovaktypes",
2314 FLG_SLOVAKTYPES,
2315 "slovak naming convention violated in a use-defined type definition",
2316 "Type name is not consistent with Slovak naming convention. Slovak type "
2317 "names may not include uppercase letters.", 0, 0
2318 },
2319{
2320 FK_NAMES, FK_ABSTRACT, specialFlag,
2321 "czechoslovak",
2322 FLG_CZECHOSLOVAK,
2323 "czech or slovak naming convention violated",
2324 "Name is not consistent with either Czech or Slovak naming convention.", 0, 0
2325 },
2326{
2327 FK_NAMES, FK_ABSTRACT, plainFlag,
2328 "czechoslovakfcns",
2329 FLG_CZECHOSLOVAKFUNCTIONS,
2330 "czechoslovak naming convention violated in a function or iterator declaration",
2331 "Function name is not consistent with Czechoslovak naming convention.", 0, 0
2332 },
2333{
2334 FK_NAMES, FK_ABSTRACT, plainFlag,
2335 "czechoslovakmacros",
2336 FLG_CZECHOSLOVAKMACROS,
2337 "czechoslovak naming convention violated in an expanded macro name",
2338 "Expanded macro name is not consistent with Czechoslovak naming convention.", 0, 0
2339 },
2340{
2341 FK_NAMES, FK_ABSTRACT, plainFlag,
2342 "czechoslovakvars",
2343 FLG_CZECHOSLOVAKVARS,
2344 "czechoslovak naming convention violated in a variable declaration",
2345 "Variable name is not consistent with Czechoslovak naming convention.", 0, 0
2346 },
2347{
2348 FK_NAMES, FK_ABSTRACT, plainFlag,
2349 "czechoslovakconsts",
2350 FLG_CZECHOSLOVAKCONSTANTS,
2351 "czechoslovak naming convention violated in a constant declaration",
2352 "Constant name is not consistent with Czechoslovak naming convention.", 0, 0
2353 },
2354{
2355 FK_NAMES, FK_ABSTRACT, plainFlag,
2356 "czechoslovaktypes",
2357 FLG_CZECHOSLOVAKTYPES,
2358 "czechoslovak naming convention violated in a user-defined type definition",
2359 "Type name is not consistent with Czechoslovak naming convention. Czechoslovak "
2360 "type names may not include uppercase letters or the underscore character.", 0, 0
2361 },
2362{
2363 FK_NAMES, FK_ANSI, modeFlag,
2364 "ansireserved",
2365 FLG_ANSIRESERVED,
2366 "external name conflicts with name reserved for system or standard library",
2367 "External name is reserved for system in ANSI standard.",
2368 0, 0
2369 },
2370{
2371 FK_NAMES, FK_ANSI, modeFlag,
2372 "cppnames",
2373 FLG_CPPNAMES,
2374 "external or internal name is a C++ keyword or reserved word",
2375 "External name is a C++ keyword or reserved word. "
2376 "This could lead to problems if the "
2377 "code is compiled with a C++ compiler.",
2378 0, 0
2379 },
2380{
2381 FK_NAMES, FK_ANSI, modeFlag,
2382 "ansireservedinternal",
2383 FLG_ANSIRESERVEDLOCAL,
2384 "internal name conflicts with name reserved for system or standard library",
2385 "Internal name is reserved for system in ANSI standard.",
2386 0, 0
2387 },
2388{
2389 FK_NAMES, FK_ANSI, plainFlag,
2390 "distinctexternalnames",
2391 FLG_DISTINCTEXTERNALNAMES,
2392 "external name is not distinguishable from another external name using "
2393 "the number of significant characters",
2394 "An external name is not distinguishable from another external name "
2395 "using the number of significant characters. According to "
2396 "ANSI Standard (3.1), an implementation may only consider the first 6 "
2397 "characters significant, and ignore alphabetical case "
2398 "distinctions. The "
2399 "+externalnamelen <n> flag may be used to change the number "
2400 "of significant characters, and -externalnamecaseinsensitive to make "
2401 "alphabetical case significant in external names.",
2402 0, 0
2403 },
2404{
2405 FK_NAMES, FK_ANSI, specialValueFlag,
2406 "externalnamelen",
2407 FLG_EXTERNALNAMELEN,
2408 "set the number of significant characters in an external name",
2409 "Sets the number of significant characters in an external name (ANSI "
2410 "default is 6.) Sets +distinctexternalnames.",
2411 0, 0
2412 },
2413{
2414 FK_NAMES, FK_ANSI, plainSpecialFlag,
2415 "externalnamecaseinsensitive",
2416 FLG_EXTERNALNAMECASEINSENSITIVE,
2417 "alphabetic comparisons for external names are case-insensitive",
2418 "Make alphabetic case insignificant in external names. By ANSI "
2419 "standard, case need not be significant in an external name. "
2420 "If +distinctexternalnames is not set, sets "
2421 "+distinctexternalnames with unlimited external name length.",
2422 0, 0
2423 },
2424{
2425 FK_NAMES, FK_ANSI, plainFlag,
2426 "distinctinternalnames",
2427 FLG_DISTINCTINTERNALNAMES,
2428 "internal name is not distinguishable from another internal name using "
2429 "the number of significant characters",
2430 "An internal name is not distinguishable from another internal name "
2431 "using the number of significant characters. According to "
2432 "ANSI Standard (3.1), an implementation may only consider the first 31 "
2433 "characters significant. The "
2434 "+internalnamelen <n> flag changes the number "
2435 "of significant characters, -internalnamecaseinsensitive to makes "
2436 "alphabetical case significant, and "
2437 "+internalnamelookalike to make similar-looking characters "
2438 "non-distinct.",
2439 0, 0
2440 },
2441{
2442 FK_NAMES, FK_ANSI, specialValueFlag,
2443 "internalnamelen",
2444 FLG_INTERNALNAMELEN,
2445 "set the number of significant characters in an internal name",
2446 "Sets the number of significant characters in an internal name (ANSI "
2447 "default is 31.) Sets +distinctinternalnames.",
2448 0, 0
2449 },
2450{
2451 FK_NAMES, FK_ANSI, plainSpecialFlag,
2452 "internalnamecaseinsensitive",
2453 FLG_INTERNALNAMECASEINSENSITIVE,
2454 "set whether case is significant an internal names "
2455 "(-internalnamecaseinsensitive means case is significant)" ,
2456 "Set whether case is significant an internal names "
2457 "(-internalnamecaseinsensitive "
2458 "means case is significant). By ANSI default, case is not "
2459 "significant. If +distinctinternalnames is not set, sets "
2460 "+distinctinternalnames with unlimited internal name length.",
2461 0, 0
2462 },
2463{
2464 FK_NAMES, FK_ANSI, plainSpecialFlag,
2465 "internalnamelookalike",
2466 FLG_INTERNALNAMELOOKALIKE,
2467 "lookalike characters match in internal names",
2468 "Set whether similar looking characters (e.g., \"1\" and \"l\") "
2469 "match in internal names.",
2470 0, 0
2471 },
2472{
2473 FK_NAMES, FK_PREFIX, idemStringFlag,
2474 "macrovarprefix",
2475 FLG_MACROVARPREFIX,
2476 "set namespace prefix for variables declared in a macro body",
2477 "A variable declared in a macro body does not start with the macrovarprefix.",
2478 0, 0
2479 } ,
2480{
2481 FK_NAMES, FK_PREFIX, plainFlag,
2482 "macrovarprefixexclude",
2483 FLG_MACROVARPREFIXEXCLUDE,
2484 "the macrovarprefix may not be used for non-macro variables",
2485 "A variable declared outside a macro body starts with the macrovarprefix.",
2486 0, 0
2487 } ,
2488{
2489 FK_NAMES, FK_PREFIX, idemStringFlag,
2490 "tagprefix",
2491 FLG_TAGPREFIX,
2492 "set namespace prefix for struct, union and enum tags",
2493 "A tag identifier does not start with the tagprefix.",
2494 0, 0
2495 } ,
2496{
2497 FK_NAMES, FK_PREFIX, plainFlag,
2498 "tagprefixexclude",
2499 FLG_TAGPREFIXEXCLUDE,
2500 "the tagprefix may not be used for non-tag identifiers",
2501 "An identifier that is not a tag starts with the tagprefix.",
2502 0, 0
2503 } ,
2504{
2505 FK_NAMES, FK_PREFIX, idemStringFlag,
2506 "enumprefix",
2507 FLG_ENUMPREFIX,
2508 "set namespace prefix for enum members",
2509 "An enum member does not start with the enumprefix.",
2510 0, 0
2511 } ,
2512{
2513 FK_NAMES, FK_PREFIX, plainFlag,
2514 "enumprefixexclude",
2515 FLG_ENUMPREFIXEXCLUDE,
2516 "the enumprefix may not be used for non-enum member identifiers",
2517 "An identifier that is not an enum member starts with the enumprefix.",
2518 0, 0
2519 } ,
2520{
2521 FK_NAMES, FK_PREFIX, idemStringFlag,
2522 "filestaticprefix",
2523 FLG_FILESTATICPREFIX,
2524 "set namespace prefix for file static declarations",
2525 "A file-static identifier does not start with the filestaticprefix.",
2526 0, 0
2527 } ,
2528{
2529 FK_NAMES, FK_PREFIX, plainFlag,
2530 "filestaticprefixexclude",
2531 FLG_FILESTATICPREFIXEXCLUDE,
2532 "the filestaticprefix may not be used for identifiers that are not file static",
2533 "An identifier that is not file static starts with the filestaticprefix.",
2534 0, 0
2535 } ,
2536{
2537 FK_NAMES, FK_PREFIX, idemStringFlag,
2538 "globalprefix",
2539 FLG_GLOBPREFIX,
2540 "set namespace prefix for global variables",
2541 "A global variable does not start with the globalprefix",
2542 0, 0
2543 } ,
2544{
2545 FK_NAMES, FK_PREFIX, plainFlag,
2546 "globalprefixexclude",
2547 FLG_GLOBPREFIXEXCLUDE,
2548 "the globalprefix may not be used for non-global identifiers",
2549 "An identifier that is not a global variable starts with the globalprefix.",
2550 0, 0
2551 } ,
2552{
2553 FK_NAMES, FK_PREFIX, idemStringFlag,
2554 "typeprefix",
2555 FLG_TYPEPREFIX,
2556 "set namespace prefix for user-defined types",
2557 "A user-defined type does not start with the typeprefix",
2558 0, 0
2559 } ,
2560{
2561 FK_NAMES, FK_PREFIX, plainFlag,
2562 "typeprefixexclude",
2563 FLG_TYPEPREFIXEXCLUDE,
2564 "the typeprefix may not be used for identifiers that are not type names",
2565 "An identifier that is not a type name starts with the typeprefix.",
2566 0, 0
2567 } ,
2568{
2569 FK_NAMES, FK_PREFIX, idemStringFlag,
2570 "externalprefix",
2571 FLG_EXTERNALPREFIX,
2572 "set namespace prefix for external identifiers",
2573 "An external identifier does not start with the externalprefix",
2574 0, 0
2575 } ,
2576{
2577 FK_NAMES, FK_PREFIX, plainFlag,
2578 "externalprefixexclude",
2579 FLG_EXTERNALPREFIXEXCLUDE,
2580 "the externalprefix may not be used for non-external identifiers",
2581 "An identifier that is not external starts with the externalprefix.",
2582 0, 0
2583 } ,
2584{
2585 FK_NAMES, FK_PREFIX, idemStringFlag,
2586 "localprefix",
2587 FLG_LOCALPREFIX,
2588 "set namespace prefix for local variables",
2589 "A local variable does not start with the localprefix",
2590 0, 0
2591 } ,
2592{
2593 FK_NAMES, FK_PREFIX, plainFlag,
2594 "localprefixexclude",
2595 FLG_LOCALPREFIXEXCLUDE,
2596 "the localprefix may not be used for non-local identifiers",
2597 "An identifier that is not a local variable starts with the localprefix.",
2598 0, 0
2599 } ,
2600{
2601 FK_NAMES, FK_PREFIX, idemStringFlag,
2602 "uncheckedmacroprefix",
2603 FLG_UNCHECKEDMACROPREFIX,
2604 "set namespace prefix for unchecked macros",
2605 "An unchecked macro name does not start with the uncheckedmacroprefix",
2606 0, 0
2607 } ,
2608{
2609 FK_NAMES, FK_PREFIX, plainFlag,
2610 "uncheckedmacroprefixexclude",
2611 FLG_UNCHECKEDMACROPREFIXEXCLUDE,
2612 "the uncheckmacroprefix may not be used for identifiers that are not "
2613 "unchecked macros",
2614 "An identifier that is not the name of an unchecked macro "
2615 "starts with the uncheckedmacroprefix.",
2616 0, 0
2617 } ,
2618{
2619 FK_NAMES, FK_PREFIX, idemStringFlag,
2620 "constprefix",
2621 FLG_CONSTPREFIX,
2622 "set namespace prefix for constants",
2623 "A constant does not start with the constantprefix",
2624 0, 0
2625 } ,
2626{
2627 FK_NAMES, FK_PREFIX, plainFlag,
2628 "constprefixexclude",
2629 FLG_CONSTPREFIXEXCLUDE,
2630 "the constprefix may not be used for non-constant identifiers",
2631 "An identifier that is not a constant starts with the constantprefix.",
2632 0, 0
2633 } ,
2634{
2635 FK_NAMES, FK_PREFIX, idemStringFlag,
2636 "iterprefix",
2637 FLG_ITERPREFIX,
2638 "set namespace prefix for iterators",
2639 "An iter does not start with the iterator prefix",
2640 0, 0
2641 } ,
2642{
2643 FK_NAMES, FK_PREFIX, plainFlag,
2644 "iterprefixexclude",
2645 FLG_ITERPREFIXEXCLUDE,
2646 "the iterprefix may not be used for non-iter identifiers",
2647 "An identifier that is not a iter starts with the iterprefix.",
2648 0, 0
2649 } ,
2650{
2651 FK_NAMES, FK_PREFIX, idemStringFlag,
2652 "protoparamprefix",
2653 FLG_DECLPARAMPREFIX,
2654 "set namespace prefix for parameters in function prototype declarations",
2655 "A parameter name in a function prototype declaration does not start with the "
2656 "declaration parameter prefix",
2657 0, 0
2658 } ,
2659{
2660 FK_NAMES, FK_PREFIX, modeFlag,
2661 "protoparamname",
2662 FLG_DECLPARAMNAME,
2663 "a parameter in a function prototype has a name",
2664 "A parameter in a function prototype has a name. This is dangerous, "
2665 "since a macro definition could be visible here.",
2666 0, 0
2667 } ,
2668{
2669 FK_NAMES, FK_PREFIX, modeFlag,
2670 "protoparammatch",
2671 FLG_DECLPARAMMATCH,
2672 "the name of a parameter in a function prototype and corresponding "
2673 "declaration must match (after removing the protoparamprefix",
2674 "A parameter in a function definition does not have the same name as "
2675 "the corresponding in the declaration of the function after "
2676 "removing the protoparamprefix",
2677 0, 0
2678 } ,
2679{
2680 FK_NAMES, FK_PREFIX, plainFlag,
2681 "protoparamprefixexclude",
2682 FLG_DECLPARAMPREFIXEXCLUDE,
2683 "the protoparamprefix may not be used for non-declaraction parameter identifiers",
2684 "An identifier that is not a parameter name in a function prototype "
2685 "starts with the protoparamprefix.",
2686 0, 0
2687 } ,
2688{
2689 FK_LIMITS, FK_ANSI, modeValueFlag,
2690 "controlnestdepth",
2691 FLG_CONTROLNESTDEPTH,
2692 "set maximum nesting depth of compound statements, iteration control "
2693 "structures, and selection control structures (ANSI minimum is 15)",
2694 "Maximum number of control levels exceeded.",
2695 0, 0
2696 },
2697{
2698 FK_LIMITS, FK_ANSI, modeValueFlag,
2699 "stringliterallen",
2700 FLG_STRINGLITERALLEN,
2701 "set maximum length of string literals (ANSI minimum is 509)",
2702 "Maximum length of string literal exceeded.",
2703 0, 0
2704 },
2705{
2706 FK_LIMITS, FK_ANSI, modeValueFlag,
2707 "numstructfields",
2708 FLG_NUMSTRUCTFIELDS,
2709 "set maximum number of fields in a struct or union (ANSI minimum is 127)",
2710 "Maximum number of fields in a struct or union exceeded.",
2711 0, 0
2712 },
2713{
2714 FK_LIMITS, FK_ANSI, modeValueFlag,
2715 "numenummembers",
2716 FLG_NUMENUMMEMBERS,
2717 "set maximum number of members of an enum (ANSI minimum is 127)",
2718 "Limit on maximum number of members of an enum is exceeded.",
2719 0, 0
2720 },
2721{
2722 FK_LIMITS, FK_ANSI, modeValueFlag,
2723 "includenest",
2724 FLG_INCLUDENEST,
2725 "set maximum number of nested #include files",
2726 "Maximum number of nested #include files exceeded.",
2727 0, 0
2728 },
2729{
2730 FK_LIMITS, FK_ANSI, specialFlag,
2731 "ansilimits",
2732 FLG_ANSILIMITS,
2733 "check for violations of standard limits (controlnestdepth, "
2734 "stringliterallen, includenest, numstructfields, numenummembers)",
2735 NULL,
2736 0, 0
2737 },
2738{
2739 FK_NAMES, FK_NONE, plainFlag,
2740 "name",
2741 FLG_NAME,
2742 NULL,
2743 "Naming convention is violated.",
2744 0, 0
2745 },
2746{
2747 FK_NONE, FK_NONE, plainFlag,
2748 "special",
2749 FLG_SPECIAL,
2750NULL, NULL,
2751 0, 0
2752 },
2753{
2754 FK_NULL, FK_MEMORY, specialFlag,
2755 "null",
2756 FLG_NULL,
2757 "misuses of null pointer",
2758 "A possibly null pointer is misused (sets nullderef, nullpass, "
2759 "nullref, nullassign, and nullstate).",
2760 0, 0
2761 },
1ac6313d 2762{
2763 FK_NT, FK_MEMORY, modeFlag,
2764 "nullterminated",
2765 FLG_NULLTERMINATED,
2766 "misuse of nullterminated allocation",
2767 "A possibly non-nullterminated string/memory is used/referenced as a nullterminated one, ",
2768 0, 0
2769},
f5ac53de 2770{
2771 FK_NT, FK_MEMORY, modeFlag,
2772 "bufferoverflow",
2773 FLG_BUFFEROVERFLOW,
2774 "possible buffer overflow",
2775 "A possibly buffer overflow has been detected, ",
2776 0, 0
2777},
2778{
2779 FK_NT, FK_MEMORY, modeFlag,
2780 "arrayread",
2781 FLG_ARRAYREAD,
2782 "possible out of bounds read",
2783 "An array or pointer access references memory beyond the array or buffer, ",
2784 0, 0
2785},
2786{
2787 FK_NT, FK_MEMORY, modeFlag,
2788 "arraywrite",
2789 FLG_ARRAYWRITE,
2790 "possible buffer overflow from an out of bounds write",
2791 "Memory is set past the end of an array or or after the allocated buffer, ",
2792 0, 0
2793},
8f299805 2794
f5ac53de 2795{
2796 FK_NT, FK_MEMORY, modeFlag,
2797 "fcnpost",
2798 FLG_FUNCTIONPOST,
8f299805 2799 "Function has the post condition_Block Post condition:_This function block has the post condition ",
f5ac53de 2800 "LCLint has determined that the following statement true after the function, ",
2801 0, 0
2802},
2803{
2804 FK_NT, FK_MEMORY, modeFlag,
2805 "fcnconstraint",
2806 FLG_FUNCTIONCONSTRAINT,
8f299805 2807 "unresolved constraint:",
f5ac53de 2808 "LCLint was unable to resolve a constraint at the top of the function. If code is correct consider using explict annotation assertions, ",
2809 0, 0
103db890 2810},
8f299805 2811 /*drl7x added 6/18/01 */
2812{
2813 FK_NT, FK_MEMORY, modeFlag,
2814 "checkpost",
2815 FLG_CHECKPOST,
2816 "unable to verify ensures annotation",
2817 "LCLint was unable to determine that the function satisfies a post condition given in an ensures annotation, ",
2818 0, 0
2819},
2820
103db890 2821{
2822 FK_NT, FK_MEMORY, modeFlag,
2823 "constraintlocation",
2824 FLG_CONSTRAINTLOCATION,
2825 "display full c expression for every constraint generated",
2826 ", ",
470b7798 2827 0, 0
2828 },/*drl added flag 4/26/01*/
2829{
2830 FK_NT, FK_MEMORY, modeFlag,
2831 "implictconstraint",
2832 FLG_IMPLICTCONSTRAINT,
2833 "Try to generate implicit constraints for functions",
2834 ", ",
103db890 2835 0, 0
2836},
90bc41f7 2837 /*drl7x added 4/29/01 */
2838{
2839 FK_NT, FK_MEMORY, modeFlag,
2840 "orconstraint",
2841 FLG_ORCONSTRAINT,
2842 "Use limited OR expressions to resolve constraints",
2843 ", ",
2844 0, 0
2845},
470b7798 2846
1ac6313d 2847{
2848 FK_NT, FK_MEMORY, modeFlag,
2849 "nullterminated",
2850 FLG_NULLTERMINATEDWARNING,
2851 "misuse of nullterminated allocation",
2852 "WARNING:A user annotated non-nullterminated buffer is used/referenced as a nullterminated one, ",
2853 0, 0
2854},
885824d3 2855{
2856 FK_NULL, FK_MEMORY, modeFlag,
2857 "nullderef",
2858 FLG_NULLDEREF,
2859 "possible dereferencce of null pointer",
2860 "A possibly null pointer is dereferenced. Value is "
2861 "either the result of a function which may return null "
2862 "(in which case, code should check it is not null), or a "
2863 "global, parameter or structure field declared with the "
2864 "null qualifier.",
2865 0, 0
2866 },
2867{
2868 FK_TYPE, FK_NONE, modeFlag,
2869 "fcnderef",
2870 FLG_FCNDEREF,
2871 "dereferencce of a function type",
2872 "A function type is dereferenced. The ANSI standard allows this "
2873 "because of implicit conversion of function designators, however the "
2874 "dereference is unnecessary.",
2875 0, 0
2876 },
2877{
2878 FK_NULL, FK_MEMORY, modeFlag,
2879 "nullpass",
2880 FLG_NULLPASS,
2881 "possibly null pointer passed as formal with no null annotation",
2882 "A possibly null pointer is passed as a parameter corresponding to "
2883 "a formal parameter with no /*@null@*/ annotation. If NULL "
2884 "may be used for this parameter, add a /*@null@*/ annotation "
2885 "to the function parameter declaration.",
2886 0, 0
2887 },
2888{
2889 FK_NULL, FK_MEMORY, modeFlag,
2890 "nullret",
2891 FLG_NULLRET,
2892 "possibly null pointer returned as result with no null annotation",
2893 "Function returns a possibly null pointer, but is not declared "
2894 "using /*@null@*/ annotation of result. If function may "
2895 "return NULL, add /*@null@*/ annotation to the return "
2896 "value declaration.",
2897 0, 0
2898 },
2899{
2900 FK_NULL, FK_MEMORY, modeFlag,
2901 "nullstate",
2902 FLG_NULLSTATE,
2903 "possibly null pointer reachable from a reference with no null annotation",
2904 "A possibly null pointer is reachable from a parameter or global "
2905 "variable that is not declared using a /*@null@*/ annotation.",
2906 0, 0
2907 },
2908{
2909 FK_NULL, FK_MEMORY, modeFlag,
2910 "nullassign",
2911 FLG_NULLASSIGN,
2912 "inconsistent assignment or initialization involving null pointer",
2913 "A reference with no null annotation is assigned or initialized "
2914 "to NULL. Use /*@null@*/ to declare the reference as "
2915 "a possibly null pointer.",
2916 0, 0
2917 },
2918{
2919 FK_OPS, FK_BOOL, modeFlag,
2920 "boolcompare",
2921 FLG_BOOLCOMPARE,
2922 "comparison between bools (dangerous because of multiple TRUE values)",
2923 "Two bool values are compared directly using a C primitive. This "
2924 "may produce unexpected results since all non-zero values are "
2925 "considered TRUE, so different TRUE values may not be equal. "
2926 "The file bool.h (included in lclint/lib) provides bool_equal "
2927 "for safe bool comparisons.", 0, 0
2928 },
2929{
2930 FK_OPS, FK_NONE, modeFlag,
2931 "realcompare",
2932 FLG_REALCOMPARE,
2933 "dangerous comparison between reals (dangerous because of inexact "
2934 "floating point representations)",
2935 "Two real (float, double, or long double) values are compared "
2936 "directly using a C primitive. "
2937 "This may produce unexpected results since floating point "
2938 "representations are inexact. Instead, compare the difference to "
2939 "FLT_EPSILON or DBL_EPSILON.",
2940 0, 0,
2941 },
2942{
2943 FK_OPS, FK_POINTER, modeFlag,
2944 "ptrarith",
2945 FLG_POINTERARITH,
2946 "arithmetic involving pointer and integer",
2947 "Pointer arithmetic using pointer and integer.", 0, 0
2948 },
2949{
2950 FK_OPS, FK_POINTER, modeFlag,
2951 "nullptrarith",
2952 FLG_NULLPOINTERARITH,
2953 "arithmetic involving possibly null pointer and integer",
2954 "Pointer arithmetic using a possibly null pointer and integer.", 0, 0
2955 },
2956{
2957 FK_OPS, FK_POINTER, modeFlag,
2958 "ptrcompare",
2959 FLG_PTRNUMCOMPARE,
2960 "comparison between pointer and number",
2961 "A pointer is compared to a number.", 0, 0
2962 },
2963{
2964 FK_OPS, FK_TYPE, modeFlag,
2965 "strictops",
2966 FLG_STRICTOPS,
2967 "primitive operation does not type check strictly",
2968 "A primitive operation does not type check strictly.", 0, 0
2969 },
2970{
2971 FK_OPS, FK_TYPE, modeFlag,
2972 "bitwisesigned",
2973 FLG_BITWISEOPS,
2974 "a bitwise logical operator does not have unsigned operands",
2975 "An operand to a bitwise operator is not an unsigned values. This "
2976 "may have unexpected results depending on the signed "
2977 "representations.", 0, 0
2978 },
2979{
2980 FK_OPS, FK_TYPE, modeFlag,
2981 "shiftsigned",
2982 FLG_SHIFTSIGNED,
2983 "a shift operator does not have unsigned operands",
2984 "An operand to a shift operator is not unsigned values. This "
2985 "may have unexpected results depending on the signed "
2986 "representations.", 0, 0
2987 },
2988{
2989 FK_OPS, FK_BOOL, modeFlag,
2990 "boolops",
2991 FLG_BOOLOPS,
2992 "primitive operation (!, && or ||) does not has a boolean argument",
2993 "The operand of a boolean operator is not a boolean. Use +ptrnegate "
2994 "to allow ! to be used on pointers.",
2995 0, 0
2996 },
2997{
2998 FK_OPS, FK_POINTER, modeFlag,
2999 "ptrnegate",
3000 FLG_PTRNEGATE,
3001 "allow ! to be used on pointer operand",
3002 "The operand of ! operator is a pointer.", 0, 0
3003 },
3004{
3005 FK_OPS, FK_TYPE, modeFlag,
3006 "sizeoftype",
3007 FLG_SIZEOFTYPE,
3008 "sizeof operator has a type argument",
3009 "Operand of sizeof operator is a type. (Safer to use expression, "
3010 "int *x = sizeof (*x); instead of sizeof (int).)",
3011 0, 0
3012 },
3013{
3014 FK_OPS, FK_TYPE, plainFlag,
3015 "sizeofformalarray",
3016 FLG_SIZEOFFORMALARRAY,
3017 "sizeof operator has an array formal parameter argument",
3018 "Operand of a sizeof operator is a function parameter declared as "
3019 "an array. The value of sizeof will be the size of a pointer to the "
3020 "element type, not the number of elements in the array.",
3021 0, 0
3022 },
3023{
3024 FK_DECL, FK_TYPE, plainFlag,
3025 "fixedformalarray",
3026 FLG_FIXEDFORMALARRAY,
3027 "formal parameter of type array is declared with size",
3028 "A formal parameter is declared as an array with size. The size of the array "
3029 "is ignored in this context, since the array formal parameter is treated "
3030 "as a pointer.",
3031 0, 0
3032 },
3033{
3034 FK_DECL, FK_TYPE, plainFlag,
3035 "incompletetype",
3036 FLG_INCOMPLETETYPE,
3037 "formal parameter has an incomplete type",
3038 "A formal parameter is declared with an incomplete type.",
3039 0, 0
3040 },
3041{
3042 FK_DECL, FK_TYPE, plainFlag,
3043 "formalarray",
3044 FLG_FORMALARRAY,
3045 "formal parameter is an array",
3046 "A formal parameter is declared as an array. This can be confusing, since "
3047 "a formal array parameter is treated as a pointer.",
3048 0, 0
3049 },
3050{
3051 FK_PRED, FK_BOOL, plainFlag,
3052 "predassign",
3053 FLG_PREDASSIGN,
3054 "condition test (if, while or for) is an assignment",
3055 "The condition test is an assignment expression. Probably, you mean "
3056 "to use == instead of =. If an assignment is intended, add an "
3057 "extra parentheses nesting (e.g., if ((a = b)) ...) to suppress "
3058 "this message.",
3059 0, 0
3060 },
3061{
3062 FK_PRED, FK_BOOL, specialFlag,
3063 "predbool",
3064 FLG_PREDBOOL,
3065 "type of condition test (if, while or for) not bool (sets predboolint, "
3066 "predboolptr and predboolothers)",
3067 "Test expression type is not boolean.", 0, 0
3068 },
3069{
3070 FK_PRED, FK_BOOL, modeFlag,
3071 "predboolint",
3072 FLG_PREDBOOLINT,
3073 "type of condition test (if, while or for) is an integral type",
3074 "Test expression type is not boolean or int.", 0, 0
3075 },
3076{
3077 FK_PRED, FK_BOOL, modeFlag,
3078 "predboolothers",
3079 FLG_PREDBOOLOTHERS,
3080 "type of condition test (if, while or for) not bool, int or pointer",
3081 "Test expression type is not boolean.", 0, 0
3082 },
3083{
3084 FK_PRED, FK_BOOL, modeFlag,
3085 "predboolptr",
3086 FLG_PREDBOOLPTR,
3087 "type of condition test (if, while or for) is a pointer",
3088 "Test expression type is not boolean.", 0, 0
3089 },
3090{
3091 FK_PREPROC, FK_NONE, globalExtraArgFlag,
3092 "D<initializer>",
3093 FLG_DEFINE,
3094 "passed to pre-processor",
3095 NULL, 0, 0
3096 },
3097{
3098 FK_PREPROC, FK_NONE, globalExtraArgFlag,
3099 "U<initializer>",
3100 FLG_UNDEFINE,
3101 "passed to pre-processor",
3102 NULL, 0, 0
3103 },
3104{
3105 FK_GLOBALS, FK_NONE, modeFlag,
3106 "globstate",
3107 FLG_GLOBSTATE,
3108 "returns with global in inconsistent state (null or undefined)",
3109 "A global variable does not satisfy its annotations when control is transferred.",
3110 0, 0
3111 },
3112{
3113 FK_SUPPRESS, FK_COMMENTS, globalFlag,
3114 "supcounts",
3115 FLG_SUPCOUNTS,
3116 "The number of errors detected does not match number in /*@i<n>@*/.",
3117 NULL, 0, 0
3118 },
3119{
3120 FK_SUPPRESS, FK_ERRORS, valueFlag,
3121 "limit",
3122 FLG_LIMIT,
3123 "limit <int> consecutive repeated errors",
3124 NULL, 0, 0
3125 },
3126{
3127 FK_SYNTAX, FK_NONE, plainFlag,
3128 "syntax",
3129 FLG_SYNTAX,
3130 "syntax error in parsing",
3131 "Code cannot be parsed. For help on parse errors, see lclint -help parseerrors.",
3132 0, 0
3133 },
3134{
3135 FK_SYNTAX, FK_NONE, plainFlag,
3136 "trytorecover",
3137 FLG_TRYTORECOVER,
3138 "try to recover from parse error",
3139 "Try to recover from parse error. It really means try --- this doesn't usually work.", 0, 0
3140 },
3141{
3142 FK_SYNTAX, FK_PREPROC, plainFlag,
3143 "preproc",
3144 FLG_PREPROC,
3145 NULL, NULL,
3146 0, 0
3147 },
3148{
3149 FK_TYPE, FK_NONE, plainFlag,
3150 "type",
3151 FLG_TYPE,
3152 "type mismatch",
3153 "Types are incompatible.",
3154 0, 0
3155 },
3156{
3157 FK_TYPE, FK_NONE, plainFlag,
3158 "fullinitblock",
3159 FLG_FULLINITBLOCK,
3160 "initializer sets all fields",
3161 "Initializer does not set every field in the structure.",
3162 0, 0
3163 },
3164{
3165 FK_TYPE, FK_NONE, modeFlag,
3166 "enummembers",
3167 FLG_ENUMMEMBERS,
3168 "enum members must be int values",
3169 "Type of initial values for enum members must be int.",
3170 0, 0
3171 },
3172
3173{
3174 FK_TYPE, FK_NONE, plainFlag,
3175 "maintype",
3176 FLG_MAINTYPE,
3177 "type of main does not match expected type",
3178 "The function main does not match the expected type.",
3179 0, 0
3180 },
3181{
3182 FK_TYPE, FK_NONE, plainFlag,
3183 "formattype",
3184 FLG_FORMATTYPE,
3185 "type-mismatch in parameter corresponding to format code in a printf or scanf-like function",
3186 "Type of parameter is not consistent with corresponding code in format string.",
3187 0, 0
3188 },
3189{
3190 FK_TYPE, FK_NONE, plainFlag,
3191 "formatcode",
3192 FLG_FORMATCODE,
3193 "invalid format code in format string for printf or scanf-like function",
3194 "Format code in a format string is not valid.",
3195 0, 0
3196 },
3197{
3198 FK_TYPEEQ, FK_ABSTRACT, modeFlag,
3199 "forwarddecl",
3200 FLG_FORWARDDECL,
3201 "forward declarations of pointers to abstract representation match abstract type",
3202 NULL, 0, 0
3203 },
3204{
3205 FK_TYPEEQ, FK_ABSTRACT, modeFlag,
3206 "voidabstract",
3207 FLG_ABSTVOIDP,
3208 "void * matches pointers to abstract types, casting ok (dangerous)",
3209 "A pointer to void is cast to a pointer to an abstract type (or vice versa).",
3210 0, 0
3211 },
3212{
3213 FK_TYPEEQ, FK_POINTER, plainFlag,
3214 "castfcnptr",
3215 FLG_CASTFCNPTR,
3216 "a pointer to a function is cast to a pointer to void (or vice versa)",
3217 "A pointer to a function is cast to (or used as) a pointer to void (or vice versa).",
3218 0, 0
3219 },
3220{
3221 FK_TYPEEQ, FK_ARRAY, modeFlag,
3222 "charindex",
3223 FLG_CHARINDEX,
3224 "char can be used to index arrays",
3225 "To allow char types to index arrays, use +charindex.", 0, 0
3226 },
3227{
3228 FK_TYPEEQ, FK_ARRAY, modeFlag,
3229 "enumindex",
3230 FLG_ENUMINDEX,
3231 "enum can be used to index arrays",
3232 "To allow enum types to index arrays, use +enumindex.", 0, 0
3233 },
3234{
3235 FK_TYPEEQ, FK_BOOL, modeFlag,
3236 "boolint",
3237 FLG_BOOLINT,
3238 "bool and int are equivalent",
3239 "To make bool and int types equivalent, use +boolint.",
3240 0, 0
3241 },
3242{
3243 FK_TYPEEQ, FK_NONE, modeFlag,
3244 "charint",
3245 FLG_CHARINT,
3246 "char and int are equivalent",
3247 "To make char and int types equivalent, use +charint.",
3248 0, 0
3249 },
3250{
3251 FK_TYPEEQ, FK_NONE, modeFlag,
3252 "enumint",
3253 FLG_ENUMINT,
3254 "enum and int are equivalent",
3255 "To make enum and int types equivalent, use +enumint.",
3256 0, 0
3257 },
3258{
3259 FK_TYPEEQ, FK_NONE, modeFlag,
3260 "floatdouble",
3261 FLG_FLOATDOUBLE,
3262 "float and double are equivalent",
3263 "To make float and double types equivalent, use +floatdouble.",
3264 0, 0
3265 },
3266{
3267 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3268 "ignorequals",
3269 FLG_IGNOREQUALS,
3270 "ignore type qualifiers (long, short, unsigned)",
3271 "To ignore type qualifiers in type comparisons use +ignorequals.",
3272 0, 0
3273 },
3274{
3275 FK_TYPEEQ, FK_SYNTAX, plainFlag,
3276 "duplicatequals",
3277 FLG_DUPLICATEQUALS,
3278 "report duplicate type qualifiers (e.g., long long)",
3279 "Duplicate type qualifiers not supported by ANSI. Some "
3280 "compilers (e.g., gcc) do support duplicate qualifiers.",
3281 0, 0
3282 },
3283{
3284 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3285 "ignoresigns",
3286 FLG_IGNORESIGNS,
3287 "ignore signs in type comparisons (unsigned matches signed)",
3288 "To ignore signs in type comparisons use +ignoresigns",
3289 0, 0
3290 },
3291{
3292 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3293 "numliteral",
3294 FLG_NUMLITERAL,
3295 "int literals can be reals",
3296 "An int literal is used as any numeric type (including float and long long). Use +numliteral to "
3297 "allow int literals to be used as any numeric type.",
3298 0, 0
3299 },
3300{
3301 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3302 "charintliteral",
3303 FLG_CHARINTLITERAL,
3304 "character constants (e.g., 'a') can be used as ints",
3305 "A character constant is used as an int. Use +charintliteral to "
3306 "allow character constants to be used as ints. (This is safe "
3307 "since the actual type of a char constant is int.)",
3308 0, 0
3309 },
3310{
3311 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3312 "relaxquals",
3313 FLG_RELAXQUALS,
3314 "report qualifier mismatches only if dangerous",
3315 NULL, 0, 0
3316 },
3317{
3318 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3319 "relaxtypes",
3320 FLG_RELAXTYPES,
3321 "allow all numeric types to match",
3322 NULL, 0, 0
3323 },
3324{
3325 FK_TYPEEQ, FK_NONE, modeFlag,
3326 "charunsignedchar",
3327 FLG_CHARUNSIGNEDCHAR,
3328 "allow char and unsigned char types to match",
3329 "To allow char and unsigned char types to match use +charunsignedchar.",
3330 0, 0
3331 },
3332{
3333 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3334 "matchanyintegral",
3335 FLG_MATCHANYINTEGRAL,
3336 "allow any intergral type to match an arbitrary integral type (e.g., dev_t)",
3337 "To allow arbitrary integral types to match any integral type, use +matchanyintegral.",
3338 0, 0
3339 },
3340{
3341 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3342 "longunsignedintegral",
3343 FLG_LONGUNSIGNEDINTEGRAL,
3344 "allow long unsigned type to match an arbitrary integral type (e.g., dev_t)",
3345 "To allow arbitrary integral types to match long unsigned, use +longunsignedintegral.",
3346 0, 0
3347 },
3348{
3349 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3350 "longintegral",
3351 FLG_LONGINTEGRAL,
3352 "allow long type to match an arbitrary integral type (e.g., dev_t)",
3353 "To allow arbitrary integral types to match long unsigned, use +longintegral.",
3354 0, 0
3355 },
3356{
3357 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3358 "longunsignedunsignedintegral",
3359 FLG_LONGUNSIGNEDUNSIGNEDINTEGRAL,
3360 "allow long unsigned type to match an arbitrary unsigned integral type (e.g., size_t)",
3361 "To allow arbitrary unsigned integral types to match long unsigned, "
3362 "use +longunsignedunsignedintegral.",
3363 0, 0
3364 },
3365{
3366 FK_TYPEEQ, FK_NUMBERS, modeFlag,
3367 "longsignedintegral",
3368 FLG_LONGSIGNEDINTEGRAL,
3369 "allow long type to match an arbitrary signed integral type (e.g., ssize_t)",
3370 "To allow arbitrary signed integral types to match long unsigned, use +longsignedintegral.",
3371 0, 0
3372 },
3373{
3374 FK_TYPEEQ, FK_POINTER, plainFlag,
3375 "zeroptr",
3376 FLG_ZEROPTR,
3377 "0 is treated as a pointer",
3378 NULL, 0, 0
3379 },
a0a162cd 3380{
3381 FK_TYPEEQ, FK_BOOL, modeFlag,
3382 "zerobool",
3383 FLG_ZEROBOOL,
3384 "0 is treated as a boolean",
3385 NULL, 0, 0
3386 },
885824d3 3387{
3388 FK_UNRECOG, FK_DISPLAY, plainFlag,
3389 "repeatunrecog",
3390 FLG_REPEATUNRECOG,
3391 "do not suppress repeated unrecognized identifier messages (instead of only reporting the first error)",
3392 "Identifier used in code has not been declared. (Message repeated for future uses in this file.)",
3393 0, 0
3394 },
3395{
3396 FK_UNRECOG, FK_DISPLAY, plainFlag,
3397 "sysunrecog",
3398 FLG_SYSTEMUNRECOG,
3399 "report unrecognized identifiers with system (__) prefix",
3400 "Identifier used in code has not been declared. (Message repeated for "
3401 "future uses in this file.) Use +gnuextensions to make lclint "
3402 "recognize some keywords that are gnu extensions.",
3403 0, 0
3404 },
3405{
3406 FK_UNRECOG, FK_NONE, plainFlag,
3407 "unrecog",
3408 FLG_UNRECOG,
3409 "unrecognized identifier",
3410 "Identifier used in code has not been declared.", 0, 0
3411 },
3412{
3413 FK_USE, FK_COMPLETE, modeFlag,
3414 "topuse",
3415 FLG_TOPUNUSED,
3416 "declaration at top level not used",
3417 "An external declaration not used in any source file.", 0, 0
3418 },
3419{
3420 FK_USE, FK_EXPORT, modeFlag,
3421 "exportlocal",
3422 FLG_EXPORTLOCAL,
3423 "a declaration is exported but not used outside this module",
3424 "A declaration is exported, but not used outside this module. "
3425 "Declaration can use static qualifier.",
3426 0, 0
3427 },
3428{
3429 FK_USE, FK_EXPORT, modeFlag,
3430 "exportheader",
3431 FLG_EXPORTHEADER,
3432 "a declaration is exported but does not appear in a header file",
3433 "A declaration is exported, but does not appear in a header file.",
3434 0, 0
3435 },
3436{
3437 FK_USE, FK_EXPORT, modeFlag,
3438 "exportheadervar",
3439 FLG_EXPORTHEADERVAR,
3440 "a variable declaration is exported but does not appear in a header file",
3441 "A variable declaration is exported, but does not appear in a header "
3442 "file. (Used with exportheader.)",
3443 0, 0
3444 },
3445{
3446 FK_USE, FK_NONE, modeFlag,
3447 "fielduse",
3448 FLG_FIELDUNUSED,
3449 "field of structure type not used",
3450 "A field is present in a structure type but never used. Use /*@unused@*/ in front of field declaration to suppress message.",
3451 0, 0
3452 },
3453{
3454 FK_USE, FK_NONE, modeFlag,
3455 "enummemuse",
3456 FLG_ENUMMEMUNUSED,
3457 "member of an enum type not used",
3458 "A member of an enum type is never used.",
3459 0, 0
3460 },
3461{
3462 FK_USE, FK_NONE, modeFlag,
3463 "constuse",
3464 FLG_CONSTUNUSED,
3465 "constant declared but not used",
3466 "A constant is declared but not used. Use unused in the constant declaration to suppress message.",
3467 0, 0
3468 },
3469{
3470 FK_USE, FK_NONE, modeFlag,
3471 "fcnuse",
3472 FLG_FUNCUNUSED,
3473 "function declared but not used",
3474 "A function is declared but not used. Use /*@unused@*/ in front of function header to suppress message.",
3475 0, 0
3476 },
3477{
3478 FK_USE, FK_PARAMS, modeFlag,
3479 "paramuse",
3480 FLG_PARAMUNUSED,
3481 "function parameter not used ",
3482 "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.",
3483 0, 0
3484 },
3485{
3486 FK_USE, FK_TYPE, modeFlag,
3487 "typeuse",
3488 FLG_TYPEUNUSED,
3489 "type declared but not used",
3490 "A type is declared but not used. Use /*@unused@*/ in front of typedef to suppress messages.",
3491 0, 0
3492 },
3493{
3494 FK_USE, FK_NONE, modeFlag,
3495 "varuse",
3496 FLG_VARUNUSED,
3497 "variable declared but not used",
3498 "A variable is declared but never used. Use /*@unused@*/ in front "
3499 "of declaration to suppress message.",
3500 0, 0
3501 },
3502
3503{
3504 FK_USE, FK_COMPLETE, modeFlag,
3505 "unusedspecial",
3506 FLG_UNUSEDSPECIAL,
3507 "unused declaration in special file (corresponding to .l or .y file)",
3508 NULL, 0, 0
3509 }
3510} ;
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
This page took 0.532406 seconds and 5 git commands to generate.