1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-20 00:42:27 +03:00

Fix compiler warning

With some newer gcc versions (8 and 9) you get a -Wformat-overflow
warning here.  In PG11 and later this was already fixed.  Since it's
trivial, backport it to get the older branches building without
warnings.

This back-patches commit 333a186dc into out-of-support branches,
pursuant to newly-established project policy.  The point is to
suppress scary-looking warnings so that people building these
branches needn't expend brain cells verifying that it's safe
to ignore the warnings.

Discussion: https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com
This commit is contained in:
Tom Lane 2021-12-13 00:24:38 -05:00
parent a1fe82d987
commit fcf1f27fe8

View File

@ -1760,7 +1760,7 @@ parseQuery(Command *cmd, const char *raw_sql)
p = sql; p = sql;
while ((p = strchr(p, ':')) != NULL) while ((p = strchr(p, ':')) != NULL)
{ {
char var[12]; char var[13];
char *name; char *name;
int eaten; int eaten;