* src/SDCCval.c: fixed bug introduced by me in rev. #4577
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 21 Jan 2007 14:42:52 +0000 (14:42 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 21 Jan 2007 14:42:52 +0000 (14:42 +0000)
* support/cpp2/libcpp/lex.c: fixed gcc 4.1.1 warnings

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4591 4a8a32a2-be11-0410-ad9d-d568d2c75423

as/mcs51/asx8051.dsp
src/SDCCval.c
support/cpp2/libcpp/lex.c

index ae242dbb83a4bff58df3d05cfe884eff0084fe09..4b6a1cfe462b6530635dffc64d31c831db9fd042 100644 (file)
@@ -7,19 +7,19 @@
 CFG=asx8051 - Win32 Release\r
 !MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
 !MESSAGE use the Export Makefile command and run\r
-!MESSAGE\r
+!MESSAGE \r
 !MESSAGE NMAKE /f "asx8051.mak".\r
-!MESSAGE\r
+!MESSAGE \r
 !MESSAGE You can specify a configuration when running NMAKE\r
 !MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE\r
+!MESSAGE \r
 !MESSAGE NMAKE /f "asx8051.mak" CFG="asx8051 - Win32 Release"\r
-!MESSAGE\r
+!MESSAGE \r
 !MESSAGE Possible choices for configuration are:\r
-!MESSAGE\r
+!MESSAGE \r
 !MESSAGE "asx8051 - Win32 Debug" (based on "Win32 (x86) Console Application")\r
 !MESSAGE "asx8051 - Win32 Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE\r
+!MESSAGE \r
 \r
 # Begin Project\r
 # PROP AllowPerConfigDependencies 0\r
@@ -77,7 +77,7 @@ LINK32=link.exe
 # ADD BASE LINK32 /nologo /subsystem:console /machine:I386 /out:"..\..\bin_vc\asx8051.exe" /pdbtype:sept\r
 # ADD LINK32 /nologo /subsystem:console /machine:I386 /out:"..\..\bin_vc\asx8051.exe" /pdbtype:sept\r
 \r
-!ENDIF\r
+!ENDIF \r
 \r
 # Begin Target\r
 \r
index 0dd0d22d7d4880e2c9746a95bea8fa7d02778c3d..575d0e927edbd4b329272eae81d9c8f2554e6033 100644 (file)
@@ -827,6 +827,8 @@ unsigned char hexEscape(const char **src)
       werror(W_ESC_SEQ_OOR_FOR_CHAR);
     }
   }
+  *src = s;
+
   return (char) value;
 }
 
index 791bdfe91ea2cf302355d54dcda9cc3096e9ce26..be96d97b39498864a59d4b8a7436d7a5ab0804c7 100644 (file)
@@ -327,27 +327,27 @@ skip_asm_block (cpp_reader *pfile)
       c = *buffer->cur++;
 
       if (prev_space && c == '_')
-       {
+        {
           if (buffer->cur + _ENDASM_LEN <= buffer->rlimit &&
-            strncmp(buffer->cur, _ENDASM_STR, _ENDASM_LEN) == 0)
+            strncmp((char *)buffer->cur, _ENDASM_STR, _ENDASM_LEN) == 0)
             {
               buffer->cur += _ENDASM_LEN;
               ret = 0;
-             break;
+              break;
             }
-       }
+        }
       else if (c == '\n')
-       {
-         unsigned int cols;
-         --buffer->cur;
-         _cpp_process_line_notes (pfile, true);
-         if (buffer->next_line >= buffer->rlimit)
-           return true;
-         _cpp_clean_line (pfile);
-
-         cols = buffer->next_line - buffer->line_base;
-         CPP_INCREMENT_LINE (pfile, cols);
-       }
+        {
+          unsigned int cols;
+          --buffer->cur;
+          _cpp_process_line_notes (pfile, true);
+          if (buffer->next_line >= buffer->rlimit)
+            return true;
+          _cpp_clean_line (pfile);
+
+          cols = buffer->next_line - buffer->line_base;
+          CPP_INCREMENT_LINE (pfile, cols);
+        }
     }
 
   _cpp_process_line_notes (pfile, true);
@@ -949,10 +949,10 @@ lex_string (cpp_reader *pfile, cpp_token *token, const uchar *base)
    CRs are automatically generated, because the output is
    opened in TEXT mode. If dest == NULL, only count chars */
 static unsigned int
-copy_text_chars (char *dest, const char *src, unsigned int len)
+copy_text_chars (unsigned char *dest, const unsigned char *src, unsigned int len)
 {
   unsigned int n = 0;
-  const char *p;
+  const unsigned char *p;
 
   for (p = src; p != src + len; ++p)
     {