Re: Cleaning up pgcrypto/crypt-des.c to avoid compiler warnings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cleaning up pgcrypto/crypt-des.c to avoid compiler warnings
Date
Msg-id 2084139.1790365155@sss.pgh.pa.us
Whole thread
In response to Re: Cleaning up pgcrypto/crypt-des.c to avoid compiler warnings  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cleaning up pgcrypto/crypt-des.c to avoid compiler warnings
Next
From: Manu
Date:
Subject: Re: REPACK (CONCURRENTLY) can silently lose updates when the toast table is rewritten