* cache.c (cache_bmmap): Don't use void* arithmetic.
authorAlan Modra <amodra@gmail.com>
Mon, 22 Oct 2012 04:51:52 +0000 (04:51 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 22 Oct 2012 04:51:52 +0000 (04:51 +0000)
bfd/ChangeLog
bfd/cache.c

index 5c6f6da..4bb6d53 100644 (file)
@@ -1,3 +1,7 @@
+2012-10-22  Alan Modra  <amodra@gmail.com>
+
+       * cache.c (cache_bmmap): Don't use void* arithmetic.
+
 2012-10-21  Alan Modra  <amodra@gmail.com>
 
        * compress.c (bfd_cache_section_contents): New function.
index 574d8b2..88f89b1 100644 (file)
@@ -437,7 +437,7 @@ cache_bmmap (struct bfd *abfd ATTRIBUTE_UNUSED,
         {
           *map_addr = ret;
           *map_len = pg_len;
-          ret += offset & pagesize_m1;
+          ret = (char *) ret + (offset & pagesize_m1);
         }
     }
 #endif