]> andersk Git - splint.git/blobdiff - src/cppmain.c
Fixed problem with unnamed unions within struct definitions.
[splint.git] / src / cppmain.c
index 117685968f69bd69f9b038bf021af06b0de807b0..74c68ba24658b90243418cd3c145003f1e4c0e4c 100644 (file)
@@ -17,8 +17,8 @@
 ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 ** MA 02111-1307, USA.
 **
-** For information on lclint: lclint-request@cs.virginia.edu
-** To report a bug: lclint-bug@cs.virginia.edu
+** For information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
 ** For more information: http://www.splint.org
 */
 /*
@@ -46,12 +46,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  You are forbidden to forbid anyone else to use, share and improve
  what you give them.   Help stamp out software-hoarding!  */
 
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
 # include "llbasic.h"
 # include "cpplib.h"
 # include "cpphash.h"
 # include "cpperror.h"
 # include "llmain.h"
+# include "osd.h"
 
 # include <stdio.h>
 
@@ -120,6 +121,7 @@ int cppProcess (/*@dependent@*/ cstring infile,
   if (ofile == NULL) 
     {
       fileTable_noDelete (context_fileTable (), outfile);
+      osd_setTempError ();
       llfatalerror (message ("Cannot create temporary file for "
                             "pre-processor output.  Trying to "
                             "open: %s.  Use -tmpdir to change "
@@ -209,14 +211,14 @@ void cppDoDefine (cstring str)
 
 void cppDoUndefine (cstring str)
 {
-  int sym_length;
+  size_t sym_length;
   hashNode hp;
   char *buf = cstring_toCharsSafe (str);
 
   sym_length = cppReader_checkMacroName (&g_cppState, buf,
-                                cstring_makeLiteralTemp ("macro"));
+                                        cstring_makeLiteralTemp ("macro"));
   
-  while ((hp = cpphash_lookup (buf, sym_length, -1)) != NULL)
+  while ((hp = cpphash_lookup (buf, size_toInt (sym_length), -1)) != NULL)
     {
       /*@-exposetrans@*/ /*@-dependenttrans@*/
       cppReader_deleteMacro (hp);
This page took 0.070657 seconds and 4 git commands to generate.