Commit 0ef8d762 by Richard Stallman

(save_def_or_dec): If function's aux info doesn't end with a closeparen, ignore it.

(save_def_or_dec): If function's aux info doesn't end
with a closeparen, ignore it.
(xmalloc, xrealloc): Cast result of malloc.

From-SVN: r6152
parent 9db931af
...@@ -611,7 +611,7 @@ xmalloc (byte_count) ...@@ -611,7 +611,7 @@ xmalloc (byte_count)
{ {
pointer_type rv; pointer_type rv;
rv = malloc (byte_count); rv = (pointer_type) malloc (byte_count);
if (rv == NULL) if (rv == NULL)
{ {
fprintf (stderr, "\n%s: virtual memory exceeded\n", pname); fprintf (stderr, "\n%s: virtual memory exceeded\n", pname);
...@@ -631,7 +631,7 @@ xrealloc (old_space, byte_count) ...@@ -631,7 +631,7 @@ xrealloc (old_space, byte_count)
{ {
pointer_type rv; pointer_type rv;
rv = realloc (old_space, byte_count); rv = (pointer_type) realloc (old_space, byte_count);
if (rv == NULL) if (rv == NULL)
{ {
fprintf (stderr, "\n%s: virtual memory exceeded\n", pname); fprintf (stderr, "\n%s: virtual memory exceeded\n", pname);
...@@ -1710,11 +1710,18 @@ save_def_or_dec (l, is_syscalls) ...@@ -1710,11 +1710,18 @@ save_def_or_dec (l, is_syscalls)
def_dec_p->ansi_decl def_dec_p->ansi_decl
= dupnstr (ansi_start, (size_t) ((semicolon_p+1) - ansi_start)); = dupnstr (ansi_start, (size_t) ((semicolon_p+1) - ansi_start));
}
/* Backup and point at the final right paren of the final argument list. */ /* Backup and point at the final right paren of the final argument list. */
p--;
p--; while (p != ansi_start && (p[-1] == ' ' || p[-1] == '\t')) p--;
if (p[-1] != ')')
{
free_def_dec (def_dec_p);
return;
}
}
/* Now isolate a whole set of formal argument lists, one-by-one. Normally, /* Now isolate a whole set of formal argument lists, one-by-one. Normally,
there will only be one list to isolate, but there could be more. */ there will only be one list to isolate, but there could be more. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment