pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Identity columns
Date: Thu, 6 Apr 2017 11:19:41 -0400
Message-ID: <8ea7e815-956c-33fd-a2fa-f88861e32086@2ndquadrant.com> (raw)
In-Reply-To: <22227.1491488685@sss.pgh.pa.us>
References: <E1cw6lk-0008UE-KZ@gemulon.postgresql.org>
	<22227.1491488685@sss.pgh.pa.us>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

On 4/6/17 10:24, Tom Lane wrote:
> This commit is causing a compiler warning for me:
> 
> tablecmds.c: In function 'ATExecSetIdentity':
> tablecmds.c:5936: warning: 'address.objectSubId' may be used uninitialized in this function
> tablecmds.c:5936: warning: 'address.objectId' may be used uninitialized in this function
> 
> I'm not sure why it's not complaining about all three fields, because
> AFAICS, the function returns a totally undefined ObjectAddress when
> generatedEl is not set.

Yeah, that was an oversight.  It's depressing that not more compilers
warn about an obvious case like this.  I have pushed a fix.

> What is the intention there?  (If the function
> were adequately documented, maybe I could divine that for myself, but
> heaven help the reader who would like to know what this function is
> supposed to do.)

Added some comments, too.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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



view thread (5+ messages)  latest in thread

Message-ID: <8ea7e815-956c-33fd-a2fa-f88861e32086@2ndquadrant.com>
Permalink:  ../8ea7e815-956c-33fd-a2fa-f88861e32086@2ndquadrant.com/
Also on:    postgresql.org/message-id/8ea7e815-956c-33fd-a2fa-f88861e32086@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Identity columns
  In-Reply-To: <8ea7e815-956c-33fd-a2fa-f88861e32086@2ndquadrant.com>
  References: <E1cw6lk-0008UE-KZ@gemulon.postgresql.org> <22227.1491488685@sss.pgh.pa.us> <8ea7e815-956c-33fd-a2fa-f88861e32086@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox