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
This commit is contained in:
Kaveh R. Ghazi 1998-09-16 09:46:37 +00:00 committed by Kaveh Ghazi
parent 1a8fca8acc
commit 88dab4f649
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,10 @@
Wed Sep 16 12:43:19 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* 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.
Wed Sep 16 14:47:43 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* regmove.c (copy_src_to_dest): Don't copy if that requires

View File

@ -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);