summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2012-06-22 16:44:54 +0200
committerMark Wielaard <mjw@redhat.com>2012-06-22 18:15:30 +0200
commit50e2d39a524a2e166e1f779b8dae7473a52be26e (patch)
tree6602f24534d28427d9da8fdd191623f1df2a9dfc
parentd7bde9beecd7ec7c8bb1cd814cef293a0e8e6c06 (diff)
downloadelfutils-50e2d39a524a2e166e1f779b8dae7473a52be26e.tar.gz
readelf.c: Cast printf PRIu/x64 arguments to uint64_t for gcc 4.7 -Wformat.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
-rw-r--r--src/ChangeLog5
-rw-r--r--src/readelf.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index af1d92bd..40905b8a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-22 Mark Wielaard <mjw@redhat.com>
+
+ * readelf.c (print_ops): Cast printf PRIu/x64 arguments to uint64_t
+ for gcc 4.7 -Wformat.
+
2012-05-09 Roland McGrath <roland@hack.frob.com>
* elflint (check_sections): Allow zero sized sections at (filesz) end
diff --git a/src/readelf.c b/src/readelf.c
index 5dc9b6fe..d182ab50 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -4167,7 +4167,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
// XXX value might be modified by relocation
printf ("%*s[%4" PRIuMAX "] %s %" PRIu64 "\n",
indent, "", (uintmax_t) offset,
- known[op], read_8ubyte_unaligned (dbg, data));
+ known[op], (uint64_t) read_8ubyte_unaligned (dbg, data));
CONSUME (8);
data += 8;
offset += 9;
@@ -5606,7 +5606,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
printf (" %*s%-20s (%s) {%6" PRIx64 "}\n",
(int) (level * 2), "", dwarf_attr_string (attr),
dwarf_form_string (form),
- read_8ubyte_unaligned (attrp->cu->dbg, attrp->valp));
+ (uint64_t) read_8ubyte_unaligned (attrp->cu->dbg, attrp->valp));
break;
case DW_FORM_sec_offset: