cpplib.c (do_define): Cast `alloca' return value.

Mon Jun  7 13:33:39 1999  Dave Brolley  <brolley@cygnus.com>
	* cpplib.c (do_define): Cast `alloca' return value.
	(do_include, do_undef, do_pragma): Likewise.
	* cpphash.c (dump_definition): Cast `xstrdup' and `alloca' return
 	values.
	* cppfiles.c (initialize_input_buffer): Cast `xmalloc' return values.
	* gcc/cppspec.c (lang_specific_driver): Cast xmalloc return value.

From-SVN: r27391
This commit is contained in:
Dave Brolley 1999-06-07 10:35:27 +00:00 committed by Dave Brolley
parent 683a10613f
commit e7553be55a
5 changed files with 20 additions and 10 deletions

View File

@ -1,3 +1,12 @@
Mon Jun 7 13:33:39 1999 Dave Brolley <brolley@cygnus.com>
* cpplib.c (do_define): Cast `alloca' return value.
(do_include, do_undef, do_pragma): Likewise.
* cpphash.c (dump_definition): Cast `xstrdup' and `alloca' return
values.
* cppfiles.c (initialize_input_buffer): Cast `xmalloc' return values.
* gcc/cppspec.c (lang_specific_driver): Cast xmalloc return value.
Sun Jun 6 11:58:34 1999 Jakub Jelinek <jj@ultra.linux.cz> Sun Jun 6 11:58:34 1999 Jakub Jelinek <jj@ultra.linux.cz>
* sparc.md (abstf2): This should be an expand. * sparc.md (abstf2): This should be an expand.

View File

@ -1100,7 +1100,7 @@ initialize_input_buffer (pfile, fd, st)
read_and_prescan inner loop. The number of non-EMPTY entries read_and_prescan inner loop. The number of non-EMPTY entries
should be as small as humanly possible. */ should be as small as humanly possible. */
tmp = xmalloc (1 << CHAR_BIT); tmp = (U_CHAR *) xmalloc (1 << CHAR_BIT);
memset (tmp, SPECCASE_EMPTY, 1 << CHAR_BIT); memset (tmp, SPECCASE_EMPTY, 1 << CHAR_BIT);
tmp['\0'] = SPECCASE_NUL; tmp['\0'] = SPECCASE_NUL;
tmp['\r'] = SPECCASE_CR; tmp['\r'] = SPECCASE_CR;
@ -1138,7 +1138,7 @@ initialize_input_buffer (pfile, fd, st)
the case there's a potential trigraph or end-of-line digraph at the case there's a potential trigraph or end-of-line digraph at
the end of a block. */ the end of a block. */
tmp = xmalloc (pipe_buf + 2 + 2); tmp = (U_CHAR *) xmalloc (pipe_buf + 2 + 2);
pfile->input_buffer = tmp; pfile->input_buffer = tmp;
pfile->input_buffer_len = pipe_buf; pfile->input_buffer_len = pipe_buf;
} }

View File

@ -1665,9 +1665,10 @@ dump_definition (pfile, macro)
else else
{ {
struct reflist *r; struct reflist *r;
unsigned char *argnames = xstrdup (defn->args.argnames); unsigned char *argnames = (unsigned char *) xstrdup (defn->args.argnames);
unsigned char **argv = alloca (defn->nargs * sizeof(char *)); unsigned char **argv = (unsigned char **) alloca (defn->nargs *
int *argl = alloca (defn->nargs * sizeof(int)); sizeof(char *));
int *argl = (int *) alloca (defn->nargs * sizeof(int));
unsigned char *x; unsigned char *x;
int i; int i;

View File

@ -624,7 +624,7 @@ do_define (pfile, keyword)
/* Copy out the line so we can pop the token buffer. */ /* Copy out the line so we can pop the token buffer. */
buf = pfile->token_buffer + here; buf = pfile->token_buffer + here;
end = CPP_PWRITTEN (pfile); end = CPP_PWRITTEN (pfile);
macro = alloca (end - buf + 1); macro = (U_CHAR *) alloca (end - buf + 1);
bcopy (buf, macro, end - buf + 1); bcopy (buf, macro, end - buf + 1);
end = macro + (end - buf); end = macro + (end - buf);
@ -1015,7 +1015,7 @@ do_include (pfile, keyword)
} }
flen = CPP_WRITTEN (pfile) - old_written; flen = CPP_WRITTEN (pfile) - old_written;
ftok = alloca (flen + 1); ftok = (unsigned char *) alloca (flen + 1);
memcpy (ftok, pfile->token_buffer + old_written, flen); memcpy (ftok, pfile->token_buffer + old_written, flen);
ftok[flen] = '\0'; ftok[flen] = '\0';
@ -1342,7 +1342,7 @@ do_undef (pfile, keyword)
limit = CPP_PWRITTEN(pfile); limit = CPP_PWRITTEN(pfile);
/* Copy out the token so we can pop the token buffer. */ /* Copy out the token so we can pop the token buffer. */
name = alloca (limit - buf + 1); name = (U_CHAR *) alloca (limit - buf + 1);
bcopy(buf, name, limit - buf); bcopy(buf, name, limit - buf);
name[limit - buf] = '\0'; name[limit - buf] = '\0';
@ -1507,7 +1507,7 @@ do_pragma (pfile, keyword)
fname = p + 1; fname = p + 1;
p = (U_CHAR *) index (fname, '\"'); p = (U_CHAR *) index (fname, '\"');
fcopy = alloca (p - fname + 1); fcopy = (U_CHAR *) alloca (p - fname + 1);
bcopy (fname, fcopy, p - fname); bcopy (fname, fcopy, p - fname);
fcopy[p-fname] = '\0'; fcopy[p-fname] = '\0';

View File

@ -194,7 +194,7 @@ lang_specific_driver (errfn, in_argc, in_argv, in_added_libraries)
if (new_argc == argc) if (new_argc == argc)
return; return;
new_argv = xmalloc (new_argc * sizeof(char *)); new_argv = (char **) xmalloc (new_argc * sizeof(char *));
new_argv[0] = argv[0]; new_argv[0] = argv[0];
j = 1; j = 1;