From b5712766f64605f99fce76924180678d7994d56d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 4 May 2016 13:20:27 -0400 Subject: [PATCH] macho: fix printf type mismatches The %ld expects a long signed integer, but we're passing in a size_t. Use %zu which is an unsigned size_t type. R=ted.mielczarek@gmail.com Review URL: https://codereview.chromium.org/1951603002 . --- src/common/mac/macho_reader.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/mac/macho_reader.cc b/src/common/mac/macho_reader.cc index 6d7207ce..52f3c411 100644 --- a/src/common/mac/macho_reader.cc +++ b/src/common/mac/macho_reader.cc @@ -181,15 +181,15 @@ void Reader::Reporter::LoadCommandRegionTruncated() { void Reader::Reporter::LoadCommandsOverrun(size_t claimed, size_t i, LoadCommandType type) { - fprintf(stderr, "%s: file's header claims there are %ld" - " load commands, but load command #%ld", + fprintf(stderr, "%s: file's header claims there are %zu" + " load commands, but load command #%zu", filename_.c_str(), claimed, i); if (type) fprintf(stderr, ", of type %d,", type); fprintf(stderr, " extends beyond the end of the load command region\n"); } void Reader::Reporter::LoadCommandTooShort(size_t i, LoadCommandType type) { - fprintf(stderr, "%s: the contents of load command #%ld, of type %d," + fprintf(stderr, "%s: the contents of load command #%zu, of type %d," " extend beyond the size given in the load command's header\n", filename_.c_str(), i, type); }