Re: gcc 12.1.0 warning - Mailing list pgsql-hackers

From Andres Freund
Subject Re: gcc 12.1.0 warning
Date
Msg-id 20240715164155.7blp2h6j4spc2ha4@awork3.anarazel.de
Whole thread Raw
In response to Re: gcc 12.1.0 warning  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Responses Re: gcc 12.1.0 warning
List pgsql-hackers
Hi,

On 2024-05-10 12:13:21 +0300, Nazir Bilal Yavuz wrote:
> On Tue, 23 Apr 2024 at 19:59, Andres Freund <andres@anarazel.de> wrote:
> >
> >
> > Which seems entirely legitimate. ISTM that guc_var_compare() ought to only
> > cast the pointers to the key type, i.e. char *.  And incidentally that does
> > prevent the warning.
> >
> > The reason it doesn't happen in newer versions of postgres is that we aren't
> > using guc_var_compare() in the relevant places anymore...
> 
> The fix is attached. It cleanly applies from REL_15_STABLE to
> REL_12_STABLE, fixes the warnings and the tests pass.

Thanks! I've applied it to all branches - while it's not required to avoid a
warning in newer versions, it's still not correct as it was...

Greetings,

Andres



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Remove dependence on integer wrapping
Next
From: Stepan Neretin
Date:
Subject: Re: Sort functions with specialized comparators