]> andersk Git - splint.git/blobdiff - src/cstring.c
Fixed -help <mode> bug.
[splint.git] / src / cstring.c
index 4b125d361992b12f57d6b735bedb58bb2aa38117..eeb5f2b89b497ee8b144cb68b3c7dc039dfe4e02 100644 (file)
@@ -34,7 +34,6 @@
 # include "splintMacros.nf"
 # include "basic.h"
 # include "osd.h"
-# include "portab.h"
 
 /*@only@*/ /*@notnull@*/ 
 cstring cstring_newEmpty (void)
@@ -901,9 +900,6 @@ extern /*@observer@*/ cstring cstring_advanceWhiteSpace (cstring s)
   return cstring_undefined;
 }
 
-/*@i3534 @*/
-/*@ignore@*/ /* !!! DRL don't ignore large segments like this without a good reason! */
-
 /* changes strings like "sdf" "sdfsd" into "sdfsdfsd"*/
 /* This function understands that "sdf\"  \"sdfsdf" is okay*/
 static mstring doMergeString (cstring s)
@@ -956,7 +952,8 @@ static mstring doMergeString (cstring s)
              retPtr++;
              *retPtr = '\0';
              BADEXIT;
-             return ret;
+
+             /*@notreached@*/ return ret;
            }
          else
            {
@@ -972,7 +969,7 @@ static mstring doMergeString (cstring s)
       ptr++;
       
     }/* end while */
-  retPtr = '\0';
+  *retPtr = '\0';
   return ret;
 }
 
@@ -1114,7 +1111,8 @@ static mstring doExpandEscapes (cstring s, /*@out@*/ size_t *len)
   /* add the null character */
   *retPtr = '\0';
 
-  *len = retPtr - ret;
+  llassert(  (retPtr-ret) >= 0 );
+  *len = (size_t)(retPtr - ret);
   return ret;
 }
 
@@ -1163,7 +1161,7 @@ cstring cstring_replaceChar(/*@returned@*/ cstring c, char oldChar, char newChar
 
   return c;
 }
-/*@end@*/
+
 
 
 
This page took 0.039133 seconds and 4 git commands to generate.