Re: [COMMITTERS] pgsql: Remove objname/objargs split for referring to objects

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Remove objname/objargs split for referring to objects
Date: 2017-03-16 02:36:45
Message-ID: CAB7nPqSCmnWPBRtq-SjiE-gcN98w_woN+bJRbZYCqKOw3yi02Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Mar 16, 2017 at 12:18 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)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 in this 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 in this 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

Attachment Content-Type Size
objaddr-warnings.patch text/x-patch 648 bytes

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2017-03-16 03:24:08 pgsql: Clean up overly paranoid checks in mac8.c
Previous Message Robert Haas 2017-03-16 02:19:24 pgsql: Port single-page btree vacuum logic to hash indexes.

Browse pgsql-hackers by date

  From Date Subject
Next Message Vaishnavi Prabakaran 2017-03-16 02:42:33 Re: PATCH: Batch/pipelining support for libpq
Previous Message Andres Freund 2017-03-16 02:26:45 Re: Microvacuum support for Hash Index