(xmalloc, xrealloc): Cast the result of malloc, realloc.
authorRichard Stallman <rms@gnu.org>
Wed, 6 Oct 1993 22:54:04 +0000 (22:54 +0000)
committerRichard Stallman <rms@gnu.org>
Wed, 6 Oct 1993 22:54:04 +0000 (22:54 +0000)
From-SVN: r5650

gcc/bi-lexer.c

index 5e17d783dad9065f13b5a1654995ea2ac1a1e312..d631fb60cd84dd7644b223c56b83e3abb3bf65e5 100644 (file)
@@ -33,7 +33,7 @@ static char *
 xmalloc (nbytes)
      int nbytes;
 {
-  char *tmp = malloc (nbytes);
+  char *tmp = (char *) malloc (nbytes);
 
   if (!tmp)
     {
@@ -53,7 +53,9 @@ xrealloc (block, nbytes)
      char *block;
      int nbytes;
 {
-  char *tmp = block ? realloc (block, nbytes) : malloc (nbytes);
+  char *tmp = (block
+              ? (char *) realloc (block, nbytes)
+              : (char *) malloc (nbytes));
 
   if (!tmp)
     {