Patch installed to libiberty/cplus-dem.c for warning nits.
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Sun Nov 19 04:48:00 GMT 2000
I installed the following obvious patch to fix these warning nits from
cxxmain.c (which is a link to libiberty/cplus-dem.c):
> cxxmain.c:931: warning: function declaration isn't a prototype
> cxxmain.c:998: warning: subscript has type `char'
> cxxmain.c:999: warning: subscript has type `char'
> cxxmain.c:1013: warning: subscript has type `char'
> cxxmain.c:1036: warning: subscript has type `char'
2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cplus-dem.c (grow_vect): Prototype.
(ada_demangle): Cast the arg of ctype macros to unsigned char.
diff -rup orig/egcs-CVS20001118/libiberty/cplus-dem.c egcs-CVS20001118/libiberty/cplus-dem.c
--- orig/egcs-CVS20001118/libiberty/cplus-dem.c Thu Nov 16 08:21:41 2000
+++ egcs-CVS20001118/libiberty/cplus-dem.c Sat Nov 18 20:10:59 2000
@@ -527,6 +527,9 @@ static void
recursively_demangle PARAMS ((struct work_stuff *, const char **, string *,
int));
+static void
+grow_vect PARAMS ((void**, size_t*, size_t, int));
+
/* Translate count to integer, consuming tokens in the process.
Conversion terminates on the first non-digit character.
@@ -995,8 +998,8 @@ ada_demangle (mangled, option)
sizeof (char));
demangled = demangling_buffer;
- if (isdigit (mangled[len0 - 1])) {
- for (i = len0-2; i >= 0 && isdigit (mangled[i]); i -= 1)
+ if (isdigit ((unsigned char)mangled[len0 - 1])) {
+ for (i = len0-2; i >= 0 && isdigit ((unsigned char)mangled[i]); i -= 1)
;
if (i > 1 && mangled[i] == '_' && mangled[i-1] == '_')
{
@@ -1010,7 +1013,8 @@ ada_demangle (mangled, option)
}
}
- for (i = 0, j = 0; i < len0 && ! isalpha (mangled[i]); i += 1, j += 1)
+ for (i = 0, j = 0; i < len0 && ! isalpha ((unsigned char)mangled[i]);
+ i += 1, j += 1)
demangled[j] = mangled[i];
at_start_name = 1;
@@ -1033,7 +1037,7 @@ ada_demangle (mangled, option)
demangled[j] = '\000';
for (i = 0; demangled[i] != '\0'; i += 1)
- if (isupper (demangled[i]) || demangled[i] == ' ')
+ if (isupper ((unsigned char)demangled[i]) || demangled[i] == ' ')
goto Suppress;
if (! changed)
More information about the Gcc-patches
mailing list