aboutsummaryrefslogtreecommitdiff
path: root/gcc/gen-protos.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-09-16 09:46:37 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-09-16 09:46:37 +0000
commit88dab4f64985cb962551ad7462d8886dde19debc (patch)
treeb0a35bc42f7a9b188cfa6a799a2e564350914122 /gcc/gen-protos.c
parent1a8fca8acca89b7f57c3d855eda0a545d8b3ec42 (diff)
downloadgcc-88dab4f64985cb962551ad7462d8886dde19debc.zip
gcc-88dab4f64985cb962551ad7462d8886dde19debc.tar.gz
gcc-88dab4f64985cb962551ad7462d8886dde19debc.tar.bz2
gen-protos.c (parse_fn_proto): Cast argument of ISALNUM to `unsigned char'.
* gen-protos.c (parse_fn_proto): Cast argument of ISALNUM to `unsigned char'. (main): Mark parameter `argc' with ATTRIBUTE_UNUSED. When generating output, initialize missing struct member to zero. From-SVN: r22449
Diffstat (limited to 'gcc/gen-protos.c')
-rw-r--r--gcc/gen-protos.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/gen-protos.c b/gcc/gen-protos.c
index 8b018cd..f6533e7 100644
--- a/gcc/gen-protos.c
+++ b/gcc/gen-protos.c
@@ -110,7 +110,7 @@ parse_fn_proto (start, end, fn)
ptr--;
while (*ptr == ' ' || *ptr == '\t') ptr--;
- if (!ISALNUM (*ptr))
+ if (!ISALNUM ((unsigned char)*ptr))
{
if (verbose)
fprintf (stderr, "%s: Can't handle this complex prototype: %s\n",
@@ -119,7 +119,7 @@ parse_fn_proto (start, end, fn)
}
name_end = ptr+1;
- while (ISALNUM (*ptr) || *ptr == '_') --ptr;
+ while (ISALNUM ((unsigned char)*ptr) || *ptr == '_') --ptr;
name_start = ptr+1;
while (*ptr == ' ' || *ptr == '\t') ptr--;
ptr[1] = 0;
@@ -140,7 +140,7 @@ parse_fn_proto (start, end, fn)
int
main (argc, argv)
- int argc;
+ int argc ATTRIBUTE_UNUSED;
char **argv;
{
FILE *inf = stdin;
@@ -158,7 +158,7 @@ main (argc, argv)
fprintf (outf, "struct fn_decl std_protos[] = {\n");
/* A hash table entry of 0 means "unused" so reserve it. */
- fprintf (outf, " {\"\", \"\", \"\"},\n");
+ fprintf (outf, " {\"\", \"\", \"\", 0},\n");
next_index = 1;
for (;;)
@@ -180,13 +180,13 @@ main (argc, argv)
add_hash (fn_decl.fname);
- fprintf (outf, " {\"%s\", \"%s\", \"%s\"},\n",
+ fprintf (outf, " {\"%s\", \"%s\", \"%s\", 0},\n",
fn_decl.fname, fn_decl.rtype, fn_decl.params);
if (c == EOF)
break;
}
- fprintf (outf, " {0, 0, 0}\n};\n");
+ fprintf (outf, " {0, 0, 0, 0}\n};\n");
fprintf (outf, "#define HASH_SIZE %d\n", HASH_SIZE);