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:
committed by
Jérôme Duval
parent
024c0670ac
commit
969c176d82
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user