Re: [HACKERS] Warnings in objectaddress.c

2017-10-04 Thread Robert Haas
On Tue, Oct 3, 2017 at 9:41 PM, Tom Lane wrote: > Robert Haas writes: >> Perhaps we should apply some glorified version of this: > >> +if (list_length(object) < 2) >> +elog(ERROR, "fail"); > >> However, I'm not 100% sure that would be

Re: [HACKERS] Warnings in objectaddress.c

2017-10-03 Thread Tom Lane
Robert Haas writes: > Perhaps we should apply some glorified version of this: > +if (list_length(object) < 2) > +elog(ERROR, "fail"); > However, I'm not 100% sure that would be sufficient to suppress these > warnings, because the compiler has got to be smart

Re: [HACKERS] Warnings in objectaddress.c

2017-10-03 Thread Robert Haas
On Sun, Oct 1, 2017 at 10:33 AM, Дмитрий Воронин wrote: > I'm building PostgreSQL 10 rc1 sources on Debian wheezy (gcc 4.7). I have > those warnings: > > objectaddress.c: In function ‘get_object_address’: > objectaddress.c:1646:10: warning: ‘typeoids[1]’ may be used

[HACKERS] Warnings in objectaddress.c

2017-10-01 Thread Дмитрий Воронин
Hello, hackers! I'm building PostgreSQL 10 rc1 sources on Debian wheezy (gcc 4.7). I have those warnings: objectaddress.c: In function ‘get_object_address’: objectaddress.c:1646:10: warning: ‘typeoids[1]’ may be used uninitialized in this function [-Wmaybe-uninitialized]