]> andersk Git - splint.git/blobdiff - src/cppexp.c
Fixed /*@i@*/ warning in splintme
[splint.git] / src / cppexp.c
index fa4acd261af09b6ac6e90433e0e3e1cb7d98b567..8182205af963c9a4898e8c5daa4c6c8456d15e29 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ** Splint - annotation-assisted static program checker
-** Copyright (C) 1994-2002 University of Virginia,
+** Copyright (C) 1994-2003 University of Virginia,
 **         Massachusetts Institute of Technology
 **
 ** This program is free software; you can redistribute it and/or modify it
@@ -153,7 +153,7 @@ Written by Per Bothner 1994.  */
 
 static struct operation cppexp_lex (cppReader *);
 static void integer_overflow (cppReader *);
-static long left_shift (cppReader *, long, bool p_unsignedp, size_t);
+static long left_shift (cppReader *, long, bool p_unsignedp, unsigned long);
 static long right_shift (long, bool p_unsignedp, unsigned long);
 
 /*@constant short CPPREADER_ERRORTOK@*/
@@ -256,7 +256,7 @@ cppReader_parseNumber (cppReader *pfile, char *start, int olen) /*@requires maxR
 
   for (i = 0; i < len; i++)
     {
-       /*drl bee: is*/ if (p[i] == '.') {
+       if (p[i] == '.') {
        /* It's a float since it contains a point.  */
        cppReader_errorLit
          (pfile,
@@ -276,11 +276,6 @@ cppReader_parseNumber (cppReader *pfile, char *start, int olen) /*@requires maxR
     }
   else if (*p == '0')
     {
-      /*@i3434*/
-      /* drl: see if there is a reason that we shouldn't do
-       p++;
-       len--; */
-      
       base = 8;
     }
   else
@@ -335,7 +330,7 @@ cppReader_parseNumber (cppReader *pfile, char *start, int olen) /*@requires maxR
                /*@innerbreak@*/ break;
              }
 
-         /*drl bee: ltc*/    c = *p++;
+            c = *p++;
          }
        /* Don't look for any more digits after the suffixes.  */
        break;
@@ -516,7 +511,7 @@ struct operation cppexp_lex (cppReader *pfile)
          }
        
        ++ptr;
-        /*drl bee: hda*/ while (ptr < tok_end && ((c = *ptr++) != '\''))
+        while (ptr < tok_end && ((c = *ptr++) != '\''))
          {
            if (c == '\\')
              {
@@ -547,7 +542,7 @@ struct operation cppexp_lex (cppReader *pfile)
              }
          }
 
-        /*drl bee: dad*/ token_buffer[num_chars] = 0;
+        token_buffer[num_chars] = 0;
 
        if (c != '\'')
          cppReader_errorLit (pfile,
@@ -629,8 +624,8 @@ struct operation cppexp_lex (cppReader *pfile)
         {
          for (toktab = tokentab2; toktab->operator != NULL; toktab++)
            {
-            /*drl bee: hda*/   if (tok_start[0] == /*drl bee: hda*/  toktab->operator[0]
-                 && /*drl bee: hda*/  tok_start[1] ==  /*drl bee: hda*/ toktab->operator[1])
+            if (tok_start[0] == toktab->operator[0]  &&
+                tok_start[1] == toktab->operator[1])
                {
                  /*@loopbreak@*/ break;
                }
@@ -674,7 +669,7 @@ struct operation cppexp_lex (cppReader *pfile)
 int
 cppReader_parseEscape (cppReader *pfile, char **string_ptr)
 {
-  /*drl bee: pbr*/  char c = *(*string_ptr)++;
+   char c = *(*string_ptr)++;
 
   switch (c)
     {
@@ -728,7 +723,7 @@ cppReader_parseEscape (cppReader *pfile, char **string_ptr)
 
            else
              {
-        /*drl bee: pbr*/       (*string_ptr)--;
+               (*string_ptr)--;
                /*@loopbreak@*/ break;
              }
          }
@@ -798,7 +793,7 @@ integer_overflow (cppReader *pfile)
 }
 
 static long
-left_shift (cppReader *pfile, long a, bool unsignedp, size_t b)
+left_shift (cppReader *pfile, long a, bool unsignedp, unsigned long b)
 {
   if (b >= HOST_BITS_PER_LONG)
     {
@@ -1010,7 +1005,8 @@ cppReader_parseExpression (cppReader *pfile)
       while (top->rprio > lprio)
        {
          /*@-usedef@*/
-         long v1 = top[-1].value, v2 = top[0].value;
+         HOST_WIDE_INT v1 = top[-1].value;
+         HOST_WIDE_INT v2 = top[0].value;
          bool unsigned1 = top[-1].unsignedp;
          bool unsigned2 = top[0].unsignedp;
 
@@ -1303,8 +1299,8 @@ cppReader_parseExpression (cppReader *pfile)
       if (top == limit)
        {
          struct operation *new_stack;
-         int old_size = (char *) limit - (char *) stack;
-         size_t new_size = size_fromInt (2 * old_size);
+         size_t old_size = size_fromInt ((char *) limit - (char *) stack);
+         size_t new_size = (size_t) (2 * old_size);
 
          if (stack != init_stack)
            {
This page took 0.050347 seconds and 4 git commands to generate.