Re: silence compiler warning in brin.c
Zhihong Yu <zyu@yugabyte.com>
From: Zhihong Yu <zyu@yugabyte.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2022-06-01T16:46:52Z
Lists: pgsql-hackers
On Wed, Jun 1, 2022 at 9:35 AM Nathan Bossart <nathandbossart@gmail.com>
wrote:
> Hi hackers,
>
> I'm seeing a compiler warning in brin.c with an older version of gcc.
> Specifically, it seems worried that a variable might not be initialized.
> AFAICT there is no real risk, so I've attached a small patch to silence the
> warning.
>
> --
> Nathan Bossart
> Amazon Web Services: https://aws.amazon.com
Hi,
It seems the variable can be initialized to the value of GUCNestLevel since
later in the func:
/* Roll back any GUC changes executed by index functions */
AtEOXact_GUC(false, save_nestlevel);
Cheers
Commits
-
Silence compiler warnings from some older compilers.
- dd672be38d39 12.12 landed
- dd1c8dd1015f 15.0 landed
- c05118014776 10.22 landed
- 60ca2e8418a1 13.8 landed
- 4e467261560f 14.4 landed
- 37290f7f5a9a 11.17 landed