git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 648a6c7) | patch
Fix more format truncation issues
2018年3月15日 15:10:41 +0000 (11:10 -0400)
2018年3月15日 15:41:42 +0000 (11:41 -0400)
commit 3a4b891964a531aa7d242a48fcd9e41379863ead
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>
14 files changed:
contrib/pgstattuple/pgstattuple.c diff | blob | blame | history
src/backend/commands/explain.c diff | blob | blame | history
src/backend/libpq/be-secure-openssl.c diff | blob | blame | history
src/backend/utils/adt/dbsize.c diff | blob | blame | history
src/backend/utils/adt/float.c diff | blob | blame | history
src/backend/utils/adt/formatting.c diff | blob | blame | history
src/backend/utils/misc/guc.c diff | blob | blame | history
src/bin/initdb/initdb.c diff | blob | blame | history
src/bin/pg_dump/pg_backup_archiver.c diff | blob | blame | history
src/bin/pg_dump/pg_backup_tar.c diff | blob | blame | history
src/bin/pgbench/pgbench.c diff | blob | blame | history
src/include/postmaster/bgworker.h diff | blob | blame | history
src/interfaces/libpq/fe-secure-openssl.c diff | blob | blame | history
src/pl/tcl/pltcl.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /