]> andersk Git - splint.git/commitdiff
Fixed line counting for #pragma's.
authorevans1629 <evans1629>
Mon, 27 Oct 2003 18:23:29 +0000 (18:23 +0000)
committerevans1629 <evans1629>
Mon, 27 Oct 2003 18:23:29 +0000 (18:23 +0000)
src/cscannerHelp.c
src/ctbase.i
src/sRefSet.c
test/tests2.4.expect

index 1aee6d64c1e59e1c7481e993f55e1884bc97885f..ae202f4ecdbd9b2f118811159f62284e149ee573 100644 (file)
@@ -724,11 +724,15 @@ bool cscannerHelp_handleSpecial (char *yyt)
 
          cstring_free (exname);
        }
+
+      cscannerHelp_handleNewLine (); // evans 2003-10-27: pragment increments line
     }
   else if (cstring_equalPrefixLit (olc, "ident"))
     {
       /* Some pre-processors will leave these in the code.  Ignore rest of line */
+      cscannerHelp_handleNewLine (); // evans 2003-10-27: ident increments line
     }
+
   /*
   ** Yuk...Win32 filenames can have spaces in them...we need to read
   ** to the matching end quote.
@@ -835,6 +839,7 @@ bool cscannerHelp_handleSpecial (char *yyt)
        ** We handle a plain # in the input file, by echoing it, and ignoring it in the post-pp-file.
        */
        mstring_free (ol);
+       cscannerHelp_handleNewLine (); // evans 2003-10-27: increments line
        return FALSE;
       } else {
        voptgenerror
@@ -842,6 +847,7 @@ bool cscannerHelp_handleSpecial (char *yyt)
           message ("Unrecognized pre-processor directive: #%s", 
                    cstring_fromChars (ol)),
           g_currentloc);
+       cscannerHelp_handleNewLine (); // evans 2003-10-27: increments line
       }
       
       sfree (ol);
index c256432cb7e972ab558318d7973a222ece092acb..6fbb3c3d8534697e66535369e9d2b69ea7d46e4b 100644 (file)
@@ -458,7 +458,14 @@ ctbase_typeId (ctbase c)
     {
       if (ctbase_isConj (c)) 
        {
-         return ctbase_typeId (ctype_getCtbase (ctbase_getConjA (c)));
+         if (ctype_isUA (ctbase_getConjA (c))) {
+           return ctbase_typeId (ctype_getCtbase (ctbase_getConjA (c)));
+         } else if (ctype_isUA (ctbase_getConjB (c))) {
+           return ctbase_typeId (ctype_getCtbase (ctbase_getConjB (c)));
+         } else {
+           llcontbug (message ("ctbase_typeId: bad call: %q", ctbase_unparse (c)));
+           return typeId_invalid;
+         }
        }
       else
        {
index 9fffe5f85be9d8713fa8e1d9a610f9b9c36f291e..796d176463cb63bb6f3d894991dac9b249e4802d 100644 (file)
@@ -831,7 +831,8 @@ sRefSet_free (/*@only@*/ sRefSet s)
 {
   if (!sRefSet_isUndefined (s))
     {
-      llassertprint (s->entries < 1000, ("sRefSet free size: %d", s->entries));
+      /* evans 2003-10-20: increase size sanity limit from 1000 */
+      llassertprint (s->entries < 99999, ("sRefSet free size: %d", s->entries));
 
       sfree (s->elements); 
       sfree (s);
index 8ab7e1ddc4a8a1ed22aba0578a7d836dd54b2c1b..0c58bd6c99e67b7300dbe4ce9916f6cdfd637a4e 100644 (file)
@@ -88,7 +88,7 @@ error.c:5:9: Variable x initialized to type char, expects int: 'a'
 Finished checking --- 1 code warning, as expected
 
 ulrich.c: (in function utl_calloc)
-ulrich.c:14:13: Possibly null storage newblock returned as non-null: newblock
+ulrich.c:15:12: Possibly null storage newblock returned as non-null: newblock
    ulrich.c:12:16: Storage newblock may become null
 
 Finished checking --- 1 code warning, as expected
This page took 0.09688 seconds and 5 git commands to generate.