aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-02-06 07:38:50 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-02-06 07:38:50 +0000
commitbdc1937ed9b8094c8fcb835b594d67812883003f (patch)
tree4413a502f6b8ff88549cbb4d9533aaa8e14dd8f6 /gcc/cppfiles.c
parentb36ba79f65f341f556662aea2d2f7c14c4fb1ec5 (diff)
downloadgcc-bdc1937ed9b8094c8fcb835b594d67812883003f.zip
gcc-bdc1937ed9b8094c8fcb835b594d67812883003f.tar.gz
gcc-bdc1937ed9b8094c8fcb835b594d67812883003f.tar.bz2
cppfiles.c (read_and_prescan): Cast the result of `xrealloc' to U_CHAR* when assigning to one.
* 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. From-SVN: r25054
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r--gcc/cppfiles.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c
index 9ef74f1..5092b91 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: