From: Nathan Bossart <nathandbossart@gmail.com>
To: pgsql-hackers@postgresql.org
Subject: silence compiler warning in brin.c
Date: Wed, 1 Jun 2022 09:35:37 -0700
Message-ID: <20220601163537.GA2331988@nathanxps13> (raw)
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.comAttachments:silence_compiler_warning.patch (text/x-diff, 426B) downloaddiff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.cindex 52f171772d..5b564f9507 100644--- a/src/backend/access/brin/brin.c+++ b/src/backend/access/brin/brin.c@@ -1010,7 +1010,7 @@ brin_summarize_range(PG_FUNCTION_ARGS)
Relation heapRel;
Oid save_userid;
int save_sec_context;
- int save_nestlevel;+ int save_nestlevel = -1;
double numSummarized = 0;
if (RecoveryInProgress())
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com
Subject: Re: silence compiler warning in brin.c
In-Reply-To: <20220601163537.GA2331988@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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