postgresql/src/bin/initdb
Peter Eisentraut 3a4b891964 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
6275f5d28a, 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>
2018-03-15 11:41:42 -04:00
..
po Translation updates 2017-08-07 13:55:34 -04:00
t Post-PG 10 beta1 pgperltidy run 2017-05-17 19:01:23 -04:00
.gitignore Add TAP tests for client programs 2014-04-14 21:33:46 -04:00
Makefile Update copyright for 2018 2018-01-02 23:30:12 -05:00
findtimezone.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
initdb.c Fix more format truncation issues 2018-03-15 11:41:42 -04:00
nls.mk Translation updates 2017-05-15 12:19:54 -04:00