From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Cleaning up pgcrypto/crypt-des.c to avoid compiler warnings
Date: Fri, 25 Sep 2026 15:39:15 -0400
Message-ID: <2084139.1790365155@sss.pgh.pa.us> (raw)
In-Reply-To: <arbDghG1ccMXTSZH@nathan>
References: <2005885.1790359097@sss.pgh.pa.us>
<arbDghG1ccMXTSZH@nathan>
Nathan Bossart <nathandbossart@gmail.com> writes:
> On Fri, Sep 25, 2026 at 01:58:17PM -0400, Tom Lane wrote:
>> I think this odd coding, perhaps combined with all the cowboy casting
>> that's going on here, is what's confusing gcc into giving a warning.
>> I propose the attached patch to make this code less ugly and (with
>> luck) suppress the warning.
> Getting rid of the "q" variable altogether might have a better chance of
> clearing the warnings, and IMHO it further improves readability:
Yeah, I adopted something close to Ayush's variant of that.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com
Subject: Re: Cleaning up pgcrypto/crypt-des.c to avoid compiler warnings
In-Reply-To: <2084139.1790365155@sss.pgh.pa.us>
References: <2005885.1790359097@sss.pgh.pa.us> <arbDghG1ccMXTSZH@nathan> <2084139.1790365155@sss.pgh.pa.us>
* 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