tools/set_haiku_revision: Fix wrong type of arguments to formatting function

Pointed out by lgtm.

Change-Id: I385356c8bafec99d15184d5475f23e6418ec9849
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3889
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Murai Takashi
2021-04-30 14:31:14 +00:00
committed by Jérôme Duval
parent 20308ad6a7
commit c1eed5c7f3
+11 -11
View File
@@ -406,11 +406,11 @@ public:
if ((size_t)bytesRead != size) {
if (errorMessage) {
throw Exception("%s Read too few bytes (%d/%d).",
errorMessage, (int)bytesRead, (int)size);
throw Exception("%s Read too few bytes (%zd/%zu).",
errorMessage, bytesRead, size);
} else {
throw Exception("Read too few bytes (%ld/%lu).",
(int)bytesRead, (int)size);
throw Exception("Read too few bytes (%zd/%zu).",
bytesRead, size);
}
}
}
@@ -427,11 +427,11 @@ public:
if ((size_t)bytesWritten != size) {
if (errorMessage) {
throw Exception("%s Wrote too few bytes (%d/%d).",
errorMessage, (int)bytesWritten, (int)size);
throw Exception("%s Wrote too few bytes (%zd/%zu).",
errorMessage, bytesWritten, size);
} else {
throw Exception("Wrote too few bytes (%ld/%lu).",
(int)bytesWritten, (int)size);
throw Exception("Wrote too few bytes (%zd/%zu).",
bytesWritten, size);
}
}
}
@@ -611,8 +611,8 @@ void ELFObject::_ParseELFHeader()
}
}
}
template<typename ShdrType>
bool ELFObject::_ReadSectionHeader(int index, SectionInfo& info)
{
@@ -650,7 +650,7 @@ bool ELFObject::_ReadSectionHeader(int index, SectionInfo& info)
if (fSectionHeaderStrings) {
if (nameIndex >= (uint32_t)fSectionHeaderStringsLength) {
throw Exception(EIO, "Invalid ELF section header: "
"invalid name index: %lu.", nameIndex);
"invalid name index: %" PRIu32 ".", nameIndex);
}
info.name = fSectionHeaderStrings + nameIndex;
} else {