Re: Cleaning up pgcrypto/crypt-des.c to avoid compiler warnings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Cleaning up pgcrypto/crypt-des.c to avoid compiler warnings
Date: 2026-09-25 19:39:15
Message-ID: 2084139.1790365155@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nathan Bossart <nathandbossart(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

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