Re: fix stats_fetch_consistency value in postgresql.conf.sample - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: fix stats_fetch_consistency value in postgresql.conf.sample
Date
Msg-id 20220617.094358.2201653243066915172.horikyota.ntt@gmail.com
Whole thread Raw
In response to fix stats_fetch_consistency value in postgresql.conf.sample  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: fix stats_fetch_consistency value in postgresql.conf.sample
List pgsql-hackers
At Thu, 16 Jun 2022 08:23:07 -0500, Justin Pryzby <pryzby@telsasoft.com> wrote in 
> On Thu, Jun 16, 2022 at 05:19:46PM +0900, Kyotaro Horiguchi wrote:
> > At Sat, 11 Jun 2022 09:41:37 -0500, Justin Pryzby <pryzby@telsasoft.com> wrote in 
> > > Note that this gives:
> > > 
> > > guc.c:7573:9: warning: ‘dst’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> > 
> > Mmm. I don't have an idea where the 'dst' came from...
> 
> Well, in your latest patch, you've renamed it.
> 
> guc.c:7586:19: warning: ‘result’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>  7586 |  PG_RETURN_TEXT_P(cstring_to_text(result));

Ooo. I find that the patch on my hand was different from that on this
list by some reason uncertain to me.  I now understand what's
happening.

At Sat, 11 Jun 2022 09:41:37 -0500, Justin Pryzby <pryzby@telsasoft.com> wrote in 
> with gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2)

My compiler (gcc 8.5.0) (with -Wswitch) is satisfied by finding that
the switch() covers all enum values.  I don't know why the new
compiler complains with this, but compilers in such environment should
shut up by the following change.


-    char   *result;
+    char   *result = "";

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size
Next
From: Justin Pryzby
Date:
Subject: Re: pg_upgrade (12->14) fails on aggregate