From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Mark Dilger <hornschnorter(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Uninitialized variable introduced in 3217327053638085d24dd4d276e7c1f7ac2c4c6b |
Date: | 2017-04-06 15:33:16 |
Message-ID: | 60bf2fa8-4c3b-62da-a959-e73fb9fcf5b7@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 4/6/17 10:59, Mark Dilger wrote:
> Can you perhaps initialize the variable 'address' to suppress the warning? Thanks.
A potential fix for this has been pushed.
> tablecmds.c:5984:6: warning: variable 'address' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
> if (generatedEl)
> ^~~~~~~~~~~
> tablecmds.c:5999:9: note: uninitialized use occurs here
> return address;
> ^~~~~~~
> tablecmds.c:5984:2: note: remove the 'if' if its condition is always true
> if (generatedEl)
> ^~~~~~~~~~~~~~~~
> tablecmds.c:5936:2: note: variable 'address' is declared here
> ObjectAddress address;
> ^
>
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-04-06 15:35:19 | Re: increasing the default WAL segment size |
Previous Message | Tom Lane | 2017-04-06 15:29:58 | Re: partitioned tables and contrib/sepgsql |