Cast result of obstack_base to gdb_byte * in a couple spots.
authorPedro Alves <palves@redhat.com>
Fri, 19 Apr 2013 15:24:55 +0000 (15:24 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 19 Apr 2013 15:24:55 +0000 (15:24 +0000)
obstack_base returns char *.  Need to cast to gdb_byte * in a couple spots.

gdb/
2013-04-19  Pedro Alves  <palves@redhat.com>

* c-lang.c (evaluate_subexp_c): Cast result of obstack_base to
gdb_byte *.
* linux-tdep.c (linux_make_mappings_corefile_notes): Likewise.

gdb/ChangeLog
gdb/c-lang.c
gdb/linux-tdep.c

index 122cfb4178a117b9d5d4e35a92e52fb5a31cf266..4ca6617bf569e4b5d3bb9dc7d3e4a03c6c3d9401 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-19  Pedro Alves  <palves@redhat.com>
+
+       * c-lang.c (evaluate_subexp_c): Cast result of obstack_base to
+       gdb_byte *.
+       * linux-tdep.c (linux_make_mappings_corefile_notes): Likewise.
+
 2013-04-19  Pedro Alves  <palves@redhat.com>
 
        * alpha-tdep.c (alpha_extract_return_value): Use
index 6f9d392d8a88c3e21894d8c74cd8d7ec9ce2d8ec..48a1fb02be990a7d171ec1adcec5d88d4f2aaf14 100644 (file)
@@ -658,7 +658,7 @@ evaluate_subexp_c (struct type *expect_type, struct expression *exp,
            if (obstack_object_size (&output) != TYPE_LENGTH (type))
              error (_("Could not convert character "
                       "constant to target character set"));
-           value = unpack_long (type, obstack_base (&output));
+           value = unpack_long (type, (gdb_byte *) obstack_base (&output));
            result = value_from_longest (type, value);
          }
        else
index 9623d190ae8f3dd368b78b9175b79d9a61ab895f..bfb64049bc45cadd81a1ad0c5706598a0ec85c52 100644 (file)
@@ -993,8 +993,8 @@ linux_make_mappings_corefile_notes (struct gdbarch *gdbarch, bfd *obfd,
   if (mapping_data.file_count != 0)
     {
       /* Write the count to the obstack.  */
-      pack_long (obstack_base (&data_obstack), long_type,
-                mapping_data.file_count);
+      pack_long ((gdb_byte *) obstack_base (&data_obstack),
+                long_type, mapping_data.file_count);
 
       /* Copy the filenames to the data obstack.  */
       obstack_grow (&data_obstack, obstack_base (&filename_obstack),