Re: Confusing #if nesting in hmac_openssl.c

2024-04-03 Thread Michael Paquier
On Tue, Apr 02, 2024 at 03:56:13PM +0200, Daniel Gustafsson wrote: > > On 2 Apr 2024, at 15:50, Tom Lane wrote: > > > I'll go ahead with what I have. > > +1 +#ifdef USE_RESOWNER_FOR_HMAC Why not, that's cleaner. Thanks for the commit. The interactions between this code and b8bff07da are

Re: Confusing #if nesting in hmac_openssl.c

2024-04-02 Thread Daniel Gustafsson
> On 2 Apr 2024, at 15:50, Tom Lane wrote: > I'll go ahead with what I have. +1 -- Daniel Gustafsson

Re: Confusing #if nesting in hmac_openssl.c

2024-04-02 Thread Tom Lane
Daniel Gustafsson writes: > On 2 Apr 2024, at 02:01, Tom Lane wrote: >> I don't think >> it is helpful to put the resource owner manipulations inside #ifdef >> HAVE_HMAC_CTX_NEW and HAVE_HMAC_CTX_FREE --- ... >> What do you think of rearranging it as attached? > +1 on this patch, it makes the

Re: Confusing #if nesting in hmac_openssl.c

2024-04-02 Thread Daniel Gustafsson
> On 2 Apr 2024, at 02:01, Tom Lane wrote: > hmac_openssl.c:90:1: warning: unused function 'ResourceOwnerRememberHMAC' > [-Wunused-function] > hmac_openssl.c:95:1: warning: unused function 'ResourceOwnerForgetHMAC' > [-Wunused-function] > > Looking at the code, this is all from commit

Confusing #if nesting in hmac_openssl.c

2024-04-01 Thread Tom Lane
I noticed that buildfarm member batfish has been complaining like this for awhile: hmac_openssl.c:90:1: warning: unused function 'ResourceOwnerRememberHMAC' [-Wunused-function] hmac_openssl.c:95:1: warning: unused function 'ResourceOwnerForgetHMAC' [-Wunused-function] Looking at the code, this