scan.c (make_sstring_space): Add explicit conversions of allocator's return value.
authorOlivier Hainque <hainque@adacore.com>
Wed, 30 Jul 2008 07:44:09 +0000 (07:44 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Wed, 30 Jul 2008 07:44:09 +0000 (07:44 +0000)
* scan.c (make_sstring_space): Add explicit conversions of
allocator's return value.
* fix-header.c (recognized_function): Likewise.

From-SVN: r138295

gcc/ChangeLog
gcc/fix-header.c
gcc/scan.c

index a3efe937a23a08499e11ff676aae72b9174491df..19e2f3b0f26bb3f943c948f2e179375a99f1c7c0 100644 (file)
@@ -1,3 +1,9 @@
+2008-07-30  Olivier Hainque  <hainque@adacore.com>
+
+       * scan.c (make_sstring_space): Add explicit conversions of
+       allocator's return value.
+       * fix-header.c (recognized_function): Likewise.
+
 2008-07-30  Laurent Guerby  <laurent@guerby.net>
 
         PR ada/5911
index f691e4eae70ca44e89193d8f8d3927ab14106f4d..5402e949db47288d6b680fa043859324d1856e57 100644 (file)
@@ -562,7 +562,10 @@ recognized_function (const cpp_token *fname, unsigned int line, int kind,
   /* We only have a partial function declaration,
      so remember that we have to add a complete prototype.  */
   partial_count++;
-  partial = obstack_alloc (&scan_file_obstack, sizeof (struct partial_proto));
+  partial
+    = (struct partial_proto *)
+      obstack_alloc (&scan_file_obstack,
+                    sizeof (struct partial_proto));
   partial->line_seen = line;
   partial->fn = fn;
   fn->partial = partial;
index f697d26ec028d9c71a294153eb7670f51fbf699d..c6d04716271f3c22995d8338421c9f8b1458fec5 100644 (file)
@@ -35,7 +35,7 @@ make_sstring_space (sstring *str, int count)
   if (new_size <= cur_size)
     return;
 
-  str->base = xrealloc (str->base, new_size);
+  str->base = (char *) xrealloc (str->base, new_size);
   str->ptr = str->base + cur_size;
   str->limit = str->base + new_size;
 }