mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
Fix printf format to use %zd when printing sizes
Using %ld as we were doing raises compiler warnings on 32 bit platforms. Reported by Andres Freund. Discussion: https://postgr.es/m/20170407214022.fidezl2e6rk3tuiz@alap3.anarazel.de
This commit is contained in:
@@ -238,7 +238,7 @@ statext_ndistinct_deserialize(bytea *data)
|
||||
|
||||
/* we expect at least the basic fields of MVNDistinct struct */
|
||||
if (VARSIZE_ANY_EXHDR(data) < SizeOfMVNDistinct)
|
||||
elog(ERROR, "invalid MVNDistinct size %ld (expected at least %ld)",
|
||||
elog(ERROR, "invalid MVNDistinct size %zd (expected at least %zd)",
|
||||
VARSIZE_ANY_EXHDR(data), SizeOfMVNDistinct);
|
||||
|
||||
/* initialize pointer to the data part (skip the varlena header) */
|
||||
@@ -274,7 +274,7 @@ statext_ndistinct_deserialize(bytea *data)
|
||||
if (VARSIZE_ANY_EXHDR(data) < minimum_size)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATA_CORRUPTED),
|
||||
errmsg("invalid MVNDistinct size %ld (expected at least %ld)",
|
||||
errmsg("invalid MVNDistinct size %zd (expected at least %zd)",
|
||||
VARSIZE_ANY_EXHDR(data), minimum_size)));
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user