tools/locale: Fix -Wformat=

Change-Id: I2261a75e32a78fb3e43735bc9c616e101d6d39f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3313
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Murai Takashi
2020-10-14 12:45:40 +00:00
committed by Jérôme Duval
parent 024c0670ac
commit 969c176d82
2 changed files with 7 additions and 4 deletions
+5 -3
View File
@@ -151,7 +151,8 @@ DefaultCatalog::ReadFromFile(const char *path)
BStackOrHeapArray<char, 0> buf(sz);
if (!buf.IsValid()) {
fprintf(stderr, "couldn't allocate array of %Ld chars\n", sz);
fprintf(stderr, "couldn't allocate array of %" B_PRIdOFF " chars\n",
sz);
return B_NO_MEMORY;
}
res = catalogFile.Read(buf, sz);
@@ -161,8 +162,9 @@ DefaultCatalog::ReadFromFile(const char *path)
}
if (res < sz) {
fprintf(stderr,
"only got %u instead of %Lu bytes from catalog-file %s\n", res, sz,
path);
"only got %u instead of %" B_PRIdOFF " bytes "
"from catalog-file %s\n",
res, sz, path);
return res;
}
BMemoryIO memIO(buf, sz);
+2 -1
View File
@@ -287,7 +287,8 @@ main(int argc, char **argv)
char *buf = inputStr.LockBuffer(sz);
off_t rsz = inFile.Read(buf, sz);
if (rsz < sz) {
fprintf(stderr, "couldn't read %Ld bytes from %s (got only %Ld)\n",
fprintf(stderr, "couldn't read %" B_PRIdOFF " bytes from %s "
"(got only %" B_PRIdOFF ")\n",
sz, inputFile, rsz);
exit(-1);
}