summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-04-19 15:34:46 +0000
committerPedro Alves <palves@redhat.com>2013-04-19 15:34:46 +0000
commitf9d83a0bd683b2298279bb93be8cf499fef90b6c (patch)
tree3655363e08fbf75b77505bbbd260c255a23fd881
parent745eb4fdb2c0c7e68cdb9672412ad8ceca7347f2 (diff)
downloadbinutils-gdb-f9d83a0bd683b2298279bb93be8cf499fef90b6c.tar.gz
-Wpointer-sign: dwarf2read.c.
This fixes the remaining issues necessary to make the DWARF reader -Wpointer-sign clean. The 'filename' bit should be obvious. 'constant_pool' holds the contents of an obstack, which are 'char *'. gdb_byte would work too, but it'd need more casts elsewhere, so I just chose the minimal approach. Any way would be fine with me. gdb/ 2013-04-19 Pedro Alves <palves@redhat.com> * dwarf2read.c (dwarf2_get_dwz_file): Add cast to const char *. (read_index_from_section): Add cast to 'char *'.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2read.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a28fdad66c2..0d2e7f39234 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-04-19 Pedro Alves <palves@redhat.com>
+ * dwarf2read.c (dwarf2_get_dwz_file): Add cast to const char *.
+ (read_index_from_section): Add cast to 'char *'.
+
+2013-04-19 Pedro Alves <palves@redhat.com>
+
* xcoffread.c (xcoff_initial_scan): Add cast to 'char *'.
2013-04-19 Pedro Alves <palves@redhat.com>
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8490eb97e26..5a1af02c2ac 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2103,7 +2103,7 @@ dwarf2_get_dwz_file (void)
bfd_errmsg (bfd_get_error ()));
cleanup = make_cleanup (xfree, data);
- filename = data;
+ filename = (const char *) data;
if (!IS_ABSOLUTE_PATH (filename))
{
char *abs = gdb_realpath (dwarf2_per_objfile->objfile->name);
@@ -2764,7 +2764,7 @@ to use the section anyway."),
/ (2 * sizeof (offset_type)));
++i;
- map->constant_pool = addr + MAYBE_SWAP (metadata[i]);
+ map->constant_pool = (char *) (addr + MAYBE_SWAP (metadata[i]));
return 1;
}