compiler warnings in copy.c

Поиск
Список
Период
Сортировка
От Robert Haas
Тема compiler warnings in copy.c
Дата
Msg-id CA+TgmobEgs1=AT0_SRvf6K9XrG7QAUyRNeuv5D9oaXrmpST9fw@mail.gmail.com
обсуждение исходный текст
Ответы Re: compiler warnings in copy.c  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
My compiler is unhappy with the latest changes to copy.c:

gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -g -O2 -Wall -Werror
-I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2   -c -o
copy.o copy.c -MMD -MP -MF .deps/copy.Po
copy.c: In function ‘DoCopy’:
copy.c:924:30: error: ‘rte’ may be used uninitialized in this function
[-Werror=uninitialized]
copy.c:793:17: note: ‘rte’ was declared here
cc1: all warnings being treated as errors

From what I can see, this is a pretty legitimate complaint.  If
stmt->relation == NULL, then rte never gets initialized, but we still
do cstate->range_table = list_make1(rte).  That can't be good.

Also, you seem to have pushed these commits with a date more than two
weeks in the past.  Please don't do that!

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Providing catalog view to pg_hba.conf file - Patch submission
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: compiler warnings in copy.c