Re: [HACKERS] [COMMITTERS] pgsql: Remove objname/objargs split for referring to objects - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] [COMMITTERS] pgsql: Remove objname/objargs split for referring to objects
Date
Msg-id CAB7nPqSCmnWPBRtq-SjiE-gcN98w_woN+bJRbZYCqKOw3yi02Q@mail.gmail.com
Whole thread Raw
Responses [HACKERS] Re: [COMMITTERS] pgsql: Remove objname/objargs split for referringto objects  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Thu, Mar 16, 2017 at 12:18 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Peter Eisentraut wrote:
>> Remove objname/objargs split for referring to objects
>
> I don't know if this is the guilty commit, but I'm now getting these
> compiler warnings:
>
>
> /pgsql/source/master/src/backend/catalog/objectaddress.c: In function 'get_object_address':
> /pgsql/source/master/src/backend/catalog/objectaddress.c:1624:33: warning: 'typenames[1]' may be used uninitialized
inthis function [-Wmaybe-uninitialized]
 
>        ereport(ERROR,
>                                  ^
> /pgsql/source/master/src/backend/catalog/objectaddress.c:1578:8: note: 'typenames[1]' was declared here
>   char    *typenames[2];
>         ^
> /pgsql/source/master/src/backend/catalog/objectaddress.c:1624:33: warning: 'typenames[0]' may be used uninitialized
inthis function [-Wmaybe-uninitialized]
 
>        ereport(ERROR,
>                                  ^
> /pgsql/source/master/src/backend/catalog/objectaddress.c:1578:8: note: 'typenames[0]' was declared here
>   char    *typenames[2];
>         ^

What are you using as CFLAGS? As both typenames should be normally
set, what about initializing those fields with NULL and add an
assertion like the attached?
-- 
Michael

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Microvacuum support for Hash Index
Next
From: Vaishnavi Prabakaran
Date:
Subject: Re: [HACKERS] PATCH: Batch/pipelining support for libpq