Re: tablecmds.c/MergeAttributes() cleanup - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: tablecmds.c/MergeAttributes() cleanup
Date
Msg-id 20230829174521.GA2147567@nathanxps13
Whole thread Raw
In response to Re: tablecmds.c/MergeAttributes() cleanup  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: tablecmds.c/MergeAttributes() cleanup
Re: tablecmds.c/MergeAttributes() cleanup
List pgsql-hackers
On Tue, Aug 29, 2023 at 10:43:39AM +0200, Peter Eisentraut wrote:
> I have committed a few more patches from this series that were already
> agreed upon.  The remaining ones are rebased and reordered a bit, attached.

My compiler is complaining about 1fa9241b:

../postgresql/src/backend/commands/sequence.c: In function ‘DefineSequence’:
../postgresql/src/backend/commands/sequence.c:196:21: error: ‘coldef’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
  196 |   stmt->tableElts = lappend(stmt->tableElts, coldef);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This went away when I added a default case that ERROR'd or initialized
coldef to NULL.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Strange presentaion related to inheritance in \d+
Next
From: Alvaro Herrera
Date:
Subject: Re: tablecmds.c/MergeAttributes() cleanup