OSDN Git Service

* bitmap.c (bitmap_obstack_alloc_stat): Adjust cast to eliminate
authorbje <bje@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Jan 2009 08:51:56 +0000 (08:51 +0000)
committerbje <bje@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Jan 2009 08:51:56 +0000 (08:51 +0000)
C++ warning about implicit conversion from void * to struct
bitmap_head_def *.
(bitmap_obstack_free): Likewise for bitmap_element *.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143480 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/bitmap.c

index 0ac5503..79bd10e 100644 (file)
@@ -1,3 +1,10 @@
+2009-01-18  Ben Elliston  <bje@au.ibm.com>
+
+       * bitmap.c (bitmap_obstack_alloc_stat): Adjust cast to eliminate
+       C++ warning about implicit conversion from void * to struct
+       bitmap_head_def *.
+       (bitmap_obstack_free): Likewise for bitmap_element *.
+
 2009-01-17  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        * Makefile.in (BACKENDLIBS):  Reorder to match dependencies.
index 5e841e0..34eace4 100644 (file)
@@ -356,7 +356,7 @@ bitmap_obstack_alloc_stat (bitmap_obstack *bit_obstack MEM_STAT_DECL)
     bit_obstack = &bitmap_default_obstack;
   map = bit_obstack->heads;
   if (map)
-    bit_obstack->heads = (void *)map->first;
+    bit_obstack->heads = (struct bitmap_head_def *) map->first;
   else
     map = XOBNEW (&bit_obstack->obstack, bitmap_head);
   bitmap_initialize_stat (map, bit_obstack PASS_MEM_STAT);
@@ -391,7 +391,7 @@ bitmap_obstack_free (bitmap map)
   if (map)
     {
       bitmap_clear (map);
-      map->first = (void *)map->obstack->heads;
+      map->first = (bitmap_element *) map->obstack->heads;
 #ifdef GATHER_STATISTICS
       register_overhead (map, -((int)sizeof (bitmap_head)));
 #endif