]> andersk Git - splint.git/blobdiff - src/osd.c
Added support for ISO C99 _Bool and stdbool bool/true/false. The
[splint.git] / src / osd.c
index 047bb7e7342a49d1c8da18d6e4ca53436a9b5326..da780fc69f690c0112ffa65952fe9f6cb5752bab 100644 (file)
--- a/src/osd.c
+++ b/src/osd.c
@@ -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
@@ -479,7 +479,7 @@ extern /*@external@*/ int unlink (const char *) /*@modifies fileSystem@*/ ;
 /*@=redecl@*/
 # endif
 
-static s_tempError = FALSE;
+static bool s_tempError = FALSE;
 
 void osd_setTempError (void)
 {
@@ -1037,7 +1037,6 @@ cstring osd_absolutePath (cstring cwd, cstring filename)
 
 cstring osd_outputPath (cstring filename)
 {
-  /*@i2534 fix this junky code once and for all! */
 # if defined (UNIX) || defined (OS2)
   char *rel_buffer;
   char *rel_buf_p;
@@ -1078,7 +1077,6 @@ cstring osd_outputPath (cstring filename)
        }
       else
        {
-         /*@i324 ! splint didn't report an errors for: return ++path_p; */
          cstring_free (rel_buffer);
          return cstring_fromCharsNew (path_p + 1);
        }
@@ -1133,7 +1131,16 @@ cstring osd_outputPath (cstring filename)
         {
           /* Give up if the result gets to be longer
              than the absolute path name.  */
-          /*@i423@*/ if (rel_buffer + filename_len <= rel_buf_p + 3)
+         char * temp_rel_buf_p;
+
+         /*drl This comment is necessary because for some reason Splint
+           does not realize that the pasts where rel_buf_p is released
+           do not reach here*/
+         /*@-usereleased@*/
+         temp_rel_buf_p = rel_buf_p;
+         /*@-usereleased@*/
+         
+          if (rel_buffer + filename_len <= temp_rel_buf_p + 3)
            {
              sfree (rel_buffer);
              return cstring_copy (filename);
@@ -1157,7 +1164,7 @@ cstring osd_outputPath (cstring filename)
       while ((*rel_buf_p++ = *path_p++) != '\0') ;
 
       
-      /*@=usereleased@*/ /*@i523! shouldn't need these */
+      /*@=usereleased@*/ /* Splint limitation: shouldn't need these */
       --rel_buf_p;
 
       if (osd_isConnectChar (*(rel_buf_p-1)))
This page took 0.038209 seconds and 4 git commands to generate.