Re: Tree-walker callbacks vs -Wdeprecated-non-prototype - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Tree-walker callbacks vs -Wdeprecated-non-prototype
Date
Msg-id CA+hUKGKtrz0S1NjAf=e76ZyvPi+JNvtJptgEdFFdtK7r4b2jnA@mail.gmail.com
Whole thread Raw
In response to Re: Tree-walker callbacks vs -Wdeprecated-non-prototype  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Tree-walker callbacks vs -Wdeprecated-non-prototype  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
On Mon, Dec 12, 2022 at 4:07 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@gmail.com> writes:
> > As visible on seawasp and locally (16/main branch nightly packages),
> > they decided to start warning about these casts with a new strict
> > variant of the warning.  Their discussion:
>
> > https://reviews.llvm.org/D134831
>
> > There are also a few other cases unrelated to this thread's original
> > problem, for example casts involving pg_funcptr_t, HashCompareFunc.  I
> > guess our options would be to turn that warning off, or reconsider and
> > try shoving the cast of "generic" arguments pointers down into the
> > functions?
>
> I'm for "turn the warning off".  Per previous discussion, adhering
> strictly to that rule would make our code worse (less legible AND
> less safe), not better.

Alright, this seems to do the trick here.

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Improve WALRead() to suck data directly from WAL buffers when possible
Next
From: Michael Paquier
Date:
Subject: Re: Checksum errors in pg_stat_database