pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Suppress uninitialized-variable warning.
20+ messages / 4 participants
[nested] [flat]

* pgsql: Suppress uninitialized-variable warning.
@ 2010-02-11 22:17 Tom Lane <tgl@postgresql.org>
  0 siblings, 0 replies; 20+ messages in thread

From: tgl@postgresql.org @ 2010-02-11 22:17 UTC (permalink / raw)
  To: pgsql-committers

Log Message:
-----------
Suppress uninitialized-variable warning.

Modified Files:
--------------
    pgsql/src/backend/utils/misc:
        rbtree.c (r1.1 -> r1.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/rbtree.c?r1=1.1&r2=1.2)



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning.
@ 2011-01-23 18:08 Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:15 ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
  0 siblings, 1 reply; 20+ messages in thread

From: Tom Lane @ 2011-01-23 18:08 UTC (permalink / raw)
  To: pgsql-committers

Suppress uninitialized-variable warning.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=b3cfcdaad27bea9bb86d6de6cbf8d184c16...

Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: pgsql: Suppress uninitialized-variable warning.
  2011-01-23 18:08 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-01-23 18:15 ` Magnus Hagander <magnus@hagander.net>
  2011-01-23 18:21   ` Re: pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 20+ messages in thread

From: Magnus Hagander @ 2011-01-23 18:15 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers

Which compiler did that come out of? I don't think I saw it on any of
the ones I tried..

//Magnus

On Sun, Jan 23, 2011 at 19:08, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Suppress uninitialized-variable warning.
>
> Branch
> ------
> master
>
> Details
> -------
> http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=b3cfcdaad27bea9bb86d6de6cbf8d184c16...
>
> Modified Files
> --------------
> src/bin/pg_basebackup/pg_basebackup.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> --
> Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-committers
>



-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: pgsql: Suppress uninitialized-variable warning.
  2011-01-23 18:08 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:15 ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
@ 2011-01-23 18:21   ` Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:22     ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
  0 siblings, 1 reply; 20+ messages in thread

From: Tom Lane @ 2011-01-23 18:21 UTC (permalink / raw)
  To: Magnus Hagander <magnus@hagander.net>; +Cc: pgsql-committers

Magnus Hagander <magnus@hagander.net> writes:
> Which compiler did that come out of? I don't think I saw it on any of
> the ones I tried..

gcc 4.4.5, standard on Fedora 13.  I'm surprised that yours did not show
it, because the usage pattern looks beyond gcc's ability to prove safe.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: pgsql: Suppress uninitialized-variable warning.
  2011-01-23 18:08 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:15 ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
  2011-01-23 18:21   ` Re: pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-01-23 18:22     ` Magnus Hagander <magnus@hagander.net>
  2011-01-23 18:36       ` Re: pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 20+ messages in thread

From: Magnus Hagander @ 2011-01-23 18:22 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers

On Sun, Jan 23, 2011 at 19:21, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> Which compiler did that come out of? I don't think I saw it on any of
>> the ones I tried..
>
> gcc 4.4.5, standard on Fedora 13.  I'm surprised that yours did not show
> it, because the usage pattern looks beyond gcc's ability to prove safe.

Interesting. I just make clean/make:ed it again to make sure, and it
doesn't. And I'm on:
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: pgsql: Suppress uninitialized-variable warning.
  2011-01-23 18:08 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:15 ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
  2011-01-23 18:21   ` Re: pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:22     ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
@ 2011-01-23 18:36       ` Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:41         ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
  2011-01-23 18:44         ` Re: pgsql: Suppress uninitialized-variable warning. Devrim GÜNDÜZ <devrim@gunduz.org>
  0 siblings, 2 replies; 20+ messages in thread

From: Tom Lane @ 2011-01-23 18:36 UTC (permalink / raw)
  To: Magnus Hagander <magnus@hagander.net>; +Cc: pgsql-committers

Magnus Hagander <magnus@hagander.net> writes:
> On Sun, Jan 23, 2011 at 19:21, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Magnus Hagander <magnus@hagander.net> writes:
>>> Which compiler did that come out of? I don't think I saw it on any of
>>> the ones I tried..

>> gcc 4.4.5, standard on Fedora 13.  I'm surprised that yours did not show
>> it, because the usage pattern looks beyond gcc's ability to prove safe.

> Interesting. I just make clean/make:ed it again to make sure, and it
> doesn't. And I'm on:
> gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5

[ scratches head... ]  Maybe you are using different switches, perhaps
optimization higher than -O2?

But anyway, I think the project policy for such things is that we want
to suppress warnings when feasible on all common compilers, so the patch
is appropriate no matter what the specific reason for the difference is.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: pgsql: Suppress uninitialized-variable warning.
  2011-01-23 18:08 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:15 ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
  2011-01-23 18:21   ` Re: pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:22     ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
  2011-01-23 18:36       ` Re: pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-01-23 18:41         ` Magnus Hagander <magnus@hagander.net>
  1 sibling, 0 replies; 20+ messages in thread

From: Magnus Hagander @ 2011-01-23 18:41 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers

On Sun, Jan 23, 2011 at 19:36, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> On Sun, Jan 23, 2011 at 19:21, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Magnus Hagander <magnus@hagander.net> writes:
>>>> Which compiler did that come out of? I don't think I saw it on any of
>>>> the ones I tried..
>
>>> gcc 4.4.5, standard on Fedora 13.  I'm surprised that yours did not show
>>> it, because the usage pattern looks beyond gcc's ability to prove safe.
>
>> Interesting. I just make clean/make:ed it again to make sure, and it
>> doesn't. And I'm on:
>> gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
>
> [ scratches head... ]  Maybe you are using different switches, perhaps
> optimization higher than -O2?

Nope...

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -g -I../../../src/interfaces/libpq -I../../../src/include
-D_GNU_SOURCE   -c -o pg_basebackup.o pg_basebackup.c -MMD -MP -MF
.deps/pg_basebackup.Po

gives no output at all.


> But anyway, I think the project policy for such things is that we want
> to suppress warnings when feasible on all common compilers, so the patch
> is appropriate no matter what the specific reason for the difference is.

Oh yes, I totally agree. I'm just trying to figure out why I didn't
see it myself.


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: pgsql: Suppress uninitialized-variable warning.
  2011-01-23 18:08 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:15 ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
  2011-01-23 18:21   ` Re: pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-23 18:22     ` Re: pgsql: Suppress uninitialized-variable warning. Magnus Hagander <magnus@hagander.net>
  2011-01-23 18:36       ` Re: pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-01-23 18:44         ` Devrim GÜNDÜZ <devrim@gunduz.org>
  1 sibling, 0 replies; 20+ messages in thread

From: Devrim GÜNDÜZ @ 2011-01-23 18:44 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Magnus Hagander <magnus@hagander.net>; pgsql-committers

On Sun, 2011-01-23 at 13:36 -0500, Tom Lane wrote:
> >> gcc 4.4.5, standard on Fedora 13. I'm surprised that yours did not
> show
> >> it, because the usage pattern looks beyond gcc's ability to prove
> safe.
> 
> > Interesting. I just make clean/make:ed it again to make sure, and it
> > doesn't. And I'm on:
> > gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
> 
> [ scratches head... ]  Maybe you are using different switches, perhaps
> optimization higher than -O2?

Maybe there is a Fedora specific patch that causes this issue?
-- 
Devrim GÜNDÜZ
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
PostgreSQL RPM Repository: http://yum.pgrpms.org
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Attachments:

  signature.asc (application/pgp-signature, 197B) download

^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning in new checksum code.
@ 2013-03-22 16:27 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2013-03-22 16:27 UTC (permalink / raw)
  To: pgsql-committers

Suppress uninitialized-variable warning in new checksum code.

Some compilers understand that this coding is safe, and some don't.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4912385b56afe68ef76e47d38df1d61ada0fde2f

Modified Files
--------------
src/backend/storage/page/bufpage.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


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


^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning from less-bright compile
@ 2015-02-27 23:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2015-02-27 23:19 UTC (permalink / raw)
  To: pgsql-committers

Suppress uninitialized-variable warning from less-bright compilers.

The type variable must get set on first iteration of the while loop,
but there are reasonably modern gcc versions that don't realize that.
Initialize it with a dummy value.  This undoes a removal of initialization
in commit 654809e770ce270c0bb9de726c5df1ab193d60f0.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d61f1a93271b859938b6cdb301a367cdb8abf81c

Modified Files
--------------
src/backend/utils/adt/jsonb.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning from less-bright compile
@ 2015-02-28 15:46 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2015-02-28 15:46 UTC (permalink / raw)
  To: pgsql-committers

Suppress uninitialized-variable warning from less-bright compilers.

The type variable must get set on first iteration of the while loop,
but there are reasonably modern gcc versions that don't realize that.
Initialize it with a dummy value.  This undoes a removal of initialization
in commit 654809e770ce270c0bb9de726c5df1ab193d60f0.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/60ff5de22aa4781f60cc141e2518c242c66d9235

Modified Files
--------------
src/backend/utils/adt/jsonb.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning.
@ 2015-05-14 16:16 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2015-05-14 16:16 UTC (permalink / raw)
  To: pgsql-committers

Suppress uninitialized-variable warning.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6c9e93d3ffbf99435636103ad69d6469c64e2aef

Modified Files
--------------
contrib/pg_audit/pg_audit.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warnings.
@ 2016-03-30 17:36 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2016-03-30 17:36 UTC (permalink / raw)
  To: pgsql-committers

Suppress uninitialized-variable warnings.

My compiler doesn't like the lack of initialization of "flag", and
I think it's right: if there were zero keys we'd have an undefined
result.  The AND of zero items is TRUE, so initialize to TRUE.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/818e59373625d194bdec89631b661c4355d15f13

Modified Files
--------------
src/backend/utils/adt/geo_spgist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


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


^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning in new SCRAM code.
@ 2018-08-24 14:51 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2018-08-24 14:51 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Suppress uninitialized-variable warning in new SCRAM code.

While we generally don't sweat too much about "may be used uninitialized"
warnings from older compilers, I noticed that there's a fair number of
buildfarm animals that are producing such a warning *only* for this
variable.  So it seems worth silencing.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b0c5da615ec45bcd24b97a1d55b1f489b9830a4b

Modified Files
--------------
src/backend/libpq/auth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning in new SCRAM code.
@ 2018-08-24 14:51 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2018-08-24 14:51 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Suppress uninitialized-variable warning in new SCRAM code.

While we generally don't sweat too much about "may be used uninitialized"
warnings from older compilers, I noticed that there's a fair number of
buildfarm animals that are producing such a warning *only* for this
variable.  So it seems worth silencing.

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7ed1db3f4625c4cb873a21c380913433820d50ce

Modified Files
--------------
src/backend/libpq/auth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning.
@ 2019-03-27 15:10 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2019-03-27 15:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Suppress uninitialized-variable warning.

Apparently Andres' compiler is smart enough to see that hpage
must be initialized before use ... but mine isn't.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a51cc7e9e60701d31032669011adcda8b4621d93

Modified Files
--------------
src/backend/access/heap/heapam.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning.
@ 2021-04-08 19:14 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2021-04-08 19:14 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Suppress uninitialized-variable warning.

Several buildfarm critters that don't usually produce such
warnings are complaining about e717a9a18.  I think it's
actually safe, but move initialization to silence the warning.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/01add89454d5dc289ed3126d5de03169bdeff41b

Modified Files
--------------
src/backend/catalog/pg_proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning in guc.c.
@ 2021-12-13 04:45 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2021-12-13 04:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Suppress uninitialized-variable warning in guc.c.

Back-patch 26812bcaa into 9.5, to suppress one more warning
in out-of-support branches.  (Doesn't appear to be needed
before 9.5.)

Discussion: https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/60ca4eec8dc7569e267844aac302174a9ec14801

Modified Files
--------------
src/backend/utils/misc/guc.c | 2 ++
1 file changed, 2 insertions(+)



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning from a61b1f748.
@ 2022-12-27 23:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2022-12-27 23:08 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Suppress uninitialized-variable warning from a61b1f748.

Some compilers complain about sub_rteperminfos not being
initialized, evidently because they don't detect that it
is only used and set if isGeneralSelect is true.
Make it follow the long-established pattern for its
sibling variable sub_rtable.

Per reports from Pavel Stehule and the buildfarm.

Discussion: https://postgr.es/m/CAFj8pRDOvGOi-n616kM0Cc7qSbg_nGoS=-haB+D785sUXADqSg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/adb5c32eb53e1ffdc5c954aafcc5bc9ed93f3de6

Modified Files
--------------
src/backend/parser/analyze.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* pgsql: Suppress uninitialized-variable warning.
@ 2025-07-29 13:42 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2025-07-29 13:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Suppress uninitialized-variable warning.

In the wake of commit 80aa9848b, a few compilers think that
postgresAcquireSampleRowsFunc's "reltuples" might be used
uninitialized.  The logic is visibly correct, both before
and after that change; presumably what happened here is that
the previous presence of a setjmp() in the function stopped
them from attempting any flow analysis at all.  Add a dummy
initialization to silence the warning.

Reported-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAExHW5tkerCufA_F6oct5dMJ61N+yVrVgYXL7M8dD-5_zXjrDw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b9ebb92bcb6e0db111deacfbc14f470ce1b3ed8d

Modified Files
--------------
contrib/postgres_fdw/postgres_fdw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 20+ messages in thread


end of thread, other threads:[~2025-07-29 13:42 UTC | newest]

Thread overview: 20+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11 22:17 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@postgresql.org>
2011-01-23 18:08 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
2011-01-23 18:15 ` Magnus Hagander <magnus@hagander.net>
2011-01-23 18:21   ` Tom Lane <tgl@sss.pgh.pa.us>
2011-01-23 18:22     ` Magnus Hagander <magnus@hagander.net>
2011-01-23 18:36       ` Tom Lane <tgl@sss.pgh.pa.us>
2011-01-23 18:41         ` Magnus Hagander <magnus@hagander.net>
2011-01-23 18:44         ` Devrim GÜNDÜZ <devrim@gunduz.org>
2013-03-22 16:27 pgsql: Suppress uninitialized-variable warning in new checksum code. Tom Lane <tgl@sss.pgh.pa.us>
2015-02-27 23:19 pgsql: Suppress uninitialized-variable warning from less-bright compile Tom Lane <tgl@sss.pgh.pa.us>
2015-02-28 15:46 pgsql: Suppress uninitialized-variable warning from less-bright compile Tom Lane <tgl@sss.pgh.pa.us>
2015-05-14 16:16 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
2016-03-30 17:36 pgsql: Suppress uninitialized-variable warnings. Tom Lane <tgl@sss.pgh.pa.us>
2018-08-24 14:51 pgsql: Suppress uninitialized-variable warning in new SCRAM code. Tom Lane <tgl@sss.pgh.pa.us>
2018-08-24 14:51 pgsql: Suppress uninitialized-variable warning in new SCRAM code. Tom Lane <tgl@sss.pgh.pa.us>
2019-03-27 15:10 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
2021-04-08 19:14 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>
2021-12-13 04:45 pgsql: Suppress uninitialized-variable warning in guc.c. Tom Lane <tgl@sss.pgh.pa.us>
2022-12-27 23:08 pgsql: Suppress uninitialized-variable warning from a61b1f748. Tom Lane <tgl@sss.pgh.pa.us>
2025-07-29 13:42 pgsql: Suppress uninitialized-variable warning. Tom Lane <tgl@sss.pgh.pa.us>

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