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 .
This commit is contained in:
Mike Frysinger 2016-05-04 13:20:27 -04:00
parent 4f417c8c0f
commit b5712766f6

View file

@ -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);
}