From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix more format truncation issues
Date: Thu, 15 Mar 2018 15:42:35 +0000
Message-ID: <E1ewV1X-00078u-GD@gemulon.postgresql.org> (raw)
Fix more format truncation issues
Fix the warnings created by the compiler warning options
-Wformat-overflow=2 -Wformat-truncation=2, supported since GCC 7. This
is a more aggressive variant of the fixes in
6275f5d28a1577563f53f2171689d4f890a46881, which GCC 7 warned about by
default.
The issues are all harmless, but some dubious coding patterns are
cleaned up.
One issue that is of external interest is that BGW_MAXLEN is increased
from 64 to 96. Apparently, the old value would cause the bgw_name of
logical replication workers to be truncated in some circumstances.
But this doesn't actually add those warning options. It appears that
the warnings depend a bit on compilation and optimization options, so it
would be annoying to have to keep up with that. This is more of a
once-in-a-while cleanup.
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3a4b891964a531aa7d242a48fcd9e41379863ead
Modified Files
--------------
contrib/pgstattuple/pgstattuple.c | 2 +-
src/backend/commands/explain.c | 5 +++--
src/backend/libpq/be-secure-openssl.c | 2 +-
src/backend/utils/adt/dbsize.c | 2 +-
src/backend/utils/adt/float.c | 24 ++++++++++-------------
src/backend/utils/adt/formatting.c | 33 ++++++++++----------------------
src/backend/utils/misc/guc.c | 4 ++--
src/bin/initdb/initdb.c | 6 +++---
src/bin/pg_dump/pg_backup_archiver.c | 2 +-
src/bin/pg_dump/pg_backup_tar.c | 2 +-
src/bin/pgbench/pgbench.c | 4 ++--
src/include/postmaster/bgworker.h | 2 +-
src/interfaces/libpq/fe-secure-openssl.c | 2 +-
src/pl/tcl/pltcl.c | 2 +-
14 files changed, 38 insertions(+), 54 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter_e@gmx.net
Subject: Re: pgsql: Fix more format truncation issues
In-Reply-To: <E1ewV1X-00078u-GD@gemulon.postgresql.org>
References: <E1ewV1X-00078u-GD@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox