Compiling of master postgres branch with CFLAGS="-O3" shows compiler
warnings:
xact.c: In function ‘RecordTransactionAbort’:
xact.c:5709:55: warning: argument 1 null where non-null expected [-Wnonnull]
XLogRegisterData(unconstify(char *, twophase_gid),
strlen(twophase_gid) + 1);
^~~~~~~~~~~~~~~~~~~~
In file included from ../../../../src/include/c.h:61:0,
from ../../../../src/include/postgres.h:46,
from xact.c:18:
/usr/include/string.h:384:15: note: in a call to function ‘strlen’
declared here
extern size_t strlen (const char *__s)
^~~~~~
formatting.c: In function ‘parse_datetime’:
formatting.c:4229:13: warning: ‘flags’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
if (flags & DCH_ZONED)
It's not a bug. But I prepare the patch to make compiler quiet.
--
Andrey Lepikhov
Postgres Professional
https://postgrespro.com
The Russian Postgres Company