On Tue, Jul 17, 2018 at 07:23:04PM -0400, Tom Lane wrote: > Michael Paquier <[email protected]> writes: > > Rework error messages around file handling > > longfin thinks you missed at least one cast ...
Hm, I checked that. Just casting to (Size) should do it. I cannot get a warning with neither clang nor gcc on Debian SID even with -Wformat, and no OSX at hand. So the attached would fix the problem? -- Michael
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c
index 0c99b33664..306861bb79 100644
--- a/src/backend/access/transam/twophase.c
+++ b/src/backend/access/transam/twophase.c
@@ -1295,7 +1295,7 @@ ReadTwoPhaseFile(TransactionId xid, bool give_warnings)
else
ereport(WARNING,
(errmsg("could not read file \"%s\": read %d of %zu",
- path, r, stat.st_size)));
+ path, r, (Size) stat.st_size)));
}
pfree(buf);
return NULL;
signature.asc
Description: PGP signature
