]> andersk Git - splint.git/blobdiff - src/flags.def
Fixed problem with global struct assignments.
[splint.git] / src / flags.def
index 6c0d6361c5e1edee3d4a2933b67129b78b500933..e210f93ac3000b26b4a68d6ea9afe5f0a7d683f1 100644 (file)
@@ -131,6 +131,16 @@ static flaglist flags =
     "a possibly null pointer.",
     0, 0
   },
+  {
+    FK_NULL, FK_MEMORY, plainFlag,
+    "nullinit",
+    FLG_NULLINIT,
+    "inconsistent initialization involving null pointer",
+    "A reference with no null annotation is initialized "
+    "to NULL.  Use /*@null@*/ to declare the reference as "
+    "a possibly null pointer.",
+    0, 0
+  },
 
   /*
   ** Undefined Values (Section 3)
@@ -371,14 +381,14 @@ static flaglist flags =
     FK_BOOL, FK_NONE, regStringFlag, ARG_STRING,
     "boolfalse",
     FLG_BOOLFALSE,
-    "set name of boolean false (default FALSE)",
+    "set name of boolean false (default false)",
     NULL, 0, 0
   },
   {
     FK_BOOL, FK_NONE, regStringFlag, ARG_STRING,
     "booltrue",
     FLG_BOOLTRUE, 
-    "set name of boolean true (default TRUE)",
+    "set name of boolean true (default true)",
     NULL, 0, 0
   },
   {
@@ -396,10 +406,10 @@ static flaglist flags =
     FK_BOOL, FK_OPS, modeFlag,
     "boolcompare",
     FLG_BOOLCOMPARE,
-    "comparison between bools (dangerous because of multiple TRUE values)",
+    "comparison between bools (dangerous because of multiple true values)",
     "Two bool values are compared directly using a C primitive. This "
     "may produce unexpected results since all non-zero values are "
-    "considered TRUE, so different TRUE values may not be equal. "
+    "considered true, so different true values may not be equal. "
     "The file bool.h (included in splint/lib) provides bool_equal "
     "for safe bool comparisons.", 0, 0
   },
@@ -502,7 +512,23 @@ static flaglist flags =
     "numabstractlit",
     FLG_NUMABSTRACTLIT,
     "numeric literal can used as numabstract type",
-    "A numeric literal can be used as a numabstract type.",
+    "To allow a numeric literal to be used as a numabstract type, use +numabstractlit.",
+    0, 0
+  },
+  {
+    FK_ABSTRACT, FK_TYPEEQ, modeFlag,
+    "numabstractindex",
+    FLG_NUMABSTRACTINDEX,
+    "a numabstract type can be used to index an array",
+    "To allow numabstract types to index arrays, use +numabstractindex.",
+    0, 0
+  },
+  {
+    FK_ABSTRACT, FK_NONE, modeFlag,
+    "numabstractprint",
+    FLG_NUMABSTRACTPRINT,
+    "a numabstract value is printed using %d format code",
+    "A numabstract value is printed usind %d format code in a printf.",
     0, 0
   },
   {
@@ -1615,7 +1641,7 @@ static flaglist flags =
     "casebreak",
     FLG_CASEBREAK,
     "non-empty case in a switch without preceding break",
-    "Execution falls through from the previous case.", 0, 0
+    "Execution falls through from the previous case (use /*@fallthrough@*/ to mark fallthrough cases).", 0, 0
   },
   {
     FK_CONTROL, FK_NONE, modeFlag,
@@ -1893,16 +1919,16 @@ static flaglist flags =
     "Memory read or write may be out of bounds of allocated storage.", 0, 0
   },
   {
-    FK_BOUNDS, FK_MEMORY, plainFlag,
-    "likely-boundsread",
+    FK_BOUNDS, FK_MEMORY, modeFlag,
+    "likelyboundsread",
     FLG_LIKELYBOUNDSREAD,
     "likely out of bounds read",
     "A memory read references memory beyond the allocated storage.",
     0, 0
   },
   {
-    FK_BOUNDS, FK_MEMORY, plainFlag,
-    "likely-boundswrite",
+    FK_BOUNDS, FK_MEMORY, modeFlag,
+    "likelyboundswrite",
     FLG_LIKELYBOUNDSWRITE,
     "likely buffer overflow from an out of bounds write",
     "A memory write may write to an address beyond the allocated buffer.",
@@ -1910,7 +1936,7 @@ static flaglist flags =
   },
   
   {
-    FK_BOUNDS, FK_MEMORY, plainFlag,
+    FK_BOUNDS, FK_MEMORY, modeFlag,
     "boundsread",
     FLG_BOUNDSREAD,
     "possible out of bounds read",
@@ -1918,7 +1944,7 @@ static flaglist flags =
     0, 0
   },
   {
-    FK_BOUNDS, FK_MEMORY, plainFlag,
+    FK_BOUNDS, FK_MEMORY, modeFlag,
     "boundswrite",
     FLG_BOUNDSWRITE,
     "possible buffer overflow from an out of bounds write",
@@ -1954,8 +1980,8 @@ static flaglist flags =
 
   {
     FK_BOUNDS, FK_MEMORY, plainFlag,
-    "implictconstraint",
-    FLG_IMPLICTCONSTRAINT,
+    "impboundsconstraints",
+    FLG_IMPBOUNDSCONSTRAINTS,
     "generate implicit constraints for functions",
     NULL,
     0, 0
@@ -1969,16 +1995,6 @@ static flaglist flags =
     NULL,
     0, 0
   },
-  
-  {
-    FK_BOUNDS, FK_MEMORY, plainFlag,
-    "nullterminated",
-    FLG_NULLTERMINATEDWARNING,
-    "misuse of nullterminated allocation",
-    "A user annotated non-nullterminated buffer is used/referenced as a nullterminated one.",
-    0, 0
-  },
-  
   {
     FK_BOUNDS, FK_DISPLAY, plainFlag,
     "showconstraintparens",
@@ -2005,6 +2021,14 @@ static flaglist flags =
     0, 0
   }, /*drl added flag 4/26/01*/
 
+  { /* evans added 2003-06-08 */
+    FK_BOUNDS, FK_MEMORY, modeFlag,
+    "allocmismatch",
+    FLG_ALLOCMISMATCH,
+    "type conversion involves storage of non-divisble size",
+    NULL, 0, 0
+  },
+
   /*
   ** 10. Extensible Checking 
   */
@@ -2101,7 +2125,7 @@ static flaglist flags =
   },
   {
     FK_MACROS, FK_CONTROL, modeFlag,
-    "macroreturn",
+    "macroret",
     FLG_MACRORETURN,
     "return statement in macro body",
     "The body of a macro declared as a function uses a return statement. "
This page took 0.046706 seconds and 4 git commands to generate.