From a7a8b9c3002dc4027708f6a644496496877a4b62 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Thu, 11 Aug 2022 15:00:12 -0700 Subject: [PATCH] Fix int64_t format in fprintf by using PRIx64. Change-Id: Ic03ecc055c4eb097fbaaf8c8cd2c0a68d5aea8a0 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3826785 Reviewed-by: Joshua Peraza --- src/common/dwarf/dwarf2reader.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/dwarf/dwarf2reader.cc b/src/common/dwarf/dwarf2reader.cc index 9cd513da..e3d360a3 100644 --- a/src/common/dwarf/dwarf2reader.cc +++ b/src/common/dwarf/dwarf2reader.cc @@ -956,7 +956,8 @@ void CompilationUnit::ProcessDIEs() { if (!dieptr) { fprintf(stderr, "An error happens when skipping a DIE's attributes at offset " - "%lx. Stopped processing following DIEs in this CU.\n", + "0x%" PRIx64 + ". Stopped processing following DIEs in this CU.\n", absolute_offset); exit(1); } @@ -964,8 +965,8 @@ void CompilationUnit::ProcessDIEs() { dieptr = ProcessDIE(absolute_offset, dieptr, abbrev); if (!dieptr) { fprintf(stderr, - "An error happens when processing a DIE at offset %lx. Stopped " - "processing following DIEs in this CU.\n", + "An error happens when processing a DIE at offset 0x%" PRIx64 + ". Stopped processing following DIEs in this CU.\n", absolute_offset); exit(1); }