]> git.gag.com Git - fw/sdcc/blobdiff - support/cpp/cppexp.c
stdio.h not needed
[fw/sdcc] / support / cpp / cppexp.c
index 51e8e8e2fe21279042bf28a354302c0fa90a8b66..2bc875f70a65f3b9dc2f7b1c014e266797e9f663 100644 (file)
@@ -32,8 +32,8 @@ Written by Per Bothner 1994. */
 //extern char *xmalloc PARAMS ((unsigned));
 //extern char *xrealloc PARAMS ((char *, unsigned));
 
-#ifdef MULTIBYTE_CHARS
 #include <stdlib.h>
+#ifdef MULTIBYTE_CHARS
 #include <locale.h>
 #endif
 
@@ -335,7 +335,7 @@ cpp_reader *pfile)
         It is mostly copied from c-lex.c.  */
       {
         register int result = 0;
-       register num_chars = 0;
+       register int num_chars = 0;
        unsigned width = MAX_CHAR_TYPE_SIZE;
        int wide_flag = 0;
        int max_chars;
@@ -672,7 +672,7 @@ cpp_parse_expr (
   struct operation *stack = init_stack;
   struct operation *limit = stack + INIT_STACK_SIZE;
   register struct operation *top = stack;
-  int lprio, rprio;
+  int lprio, rprio = 0;
 
   top->rprio = 0;
   top->flags = 0;
@@ -965,7 +965,7 @@ cpp_parse_expr (
          if (top != stack)
            cpp_error (pfile, "internal error in #if expression");
          if (stack != init_stack)
-           free (stack);
+           Safe_free (stack);
          return top->value;
        }
       top++;
@@ -994,7 +994,7 @@ cpp_parse_expr (
     }
  syntax_error:
   if (stack != init_stack)
-    free (stack);
+    Safe_free (stack);
   skip_rest_of_line (pfile);
   return 0;
 }