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