From a5944b5c4647eb06a6b0ed3ad77d61ef4c4262c4 Mon Sep 17 00:00:00 2001 From: ghazi Date: Sat, 6 Feb 1999 07:38:50 +0000 Subject: * cppfiles.c (read_and_prescan): Cast the result of `xrealloc' to U_CHAR* when assigning to one. Ensure the values of a ?: operator have the same type. * cppinit.c (initialize_char_syntax): Use K&R function definition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25054 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cppfiles.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gcc/cppfiles.c') diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 9ef74f1b8f9..5092b916718 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -860,7 +860,7 @@ read_and_prescan (pfile, fp, desc, len) delta_op = op - buf; delta_line_base = line_base - buf; - buf = xrealloc (buf, len); + buf = (U_CHAR *) xrealloc (buf, len); op = buf + delta_op; line_base = buf + delta_line_base; } @@ -989,7 +989,7 @@ read_and_prescan (pfile, fp, desc, len) len += 2; if (offset + 2 > len) goto too_big; - buf = xrealloc (buf, len); + buf = (U_CHAR *) xrealloc (buf, len); op = buf + offset; } if (op[-1] == '\\') @@ -997,7 +997,8 @@ read_and_prescan (pfile, fp, desc, len) *op++ = '\n'; } - fp->buf = (len - offset < 20) ? buf : xrealloc (buf, op - buf); + fp->buf = + (U_CHAR *) ((len - offset < 20) ? (PTR) buf : xrealloc (buf, op - buf)); return op - buf; too_big: -- cgit v1.2.3