Warning in the RecordTransactionAbort routine during compilation withO3 flag

Поиск
Список
Период
Сортировка
От Andrey Lepikhov
Тема Warning in the RecordTransactionAbort routine during compilation withO3 flag
Дата
Msg-id a7e28b83-27b1-4e1c-c76b-4268c4b785bc@postgrespro.ru
обсуждение исходный текст
Ответы Re: Warning in the RecordTransactionAbort routine during compilationwith O3 flag  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
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

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Jan Przemysław Wójcik
Дата:
Сообщение: Unexpected extra row from jsonb_path_query() with a recursive path
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Unexpected extra row from jsonb_path_query() with a recursivepath