Re: pgcrypto support for bcrypt $2b$ hashes - Mailing list pgsql-hackers

From Daniel Fone
Subject Re: pgcrypto support for bcrypt $2b$ hashes
Date
Msg-id 36563AEE-F06D-42F6-948F-B92060DEFCE5@fone.net.nz
Whole thread Raw
In response to Re: pgcrypto support for bcrypt $2b$ hashes  (Andreas Karlsson <andreas@proxel.se>)
Responses Re: pgcrypto support for bcrypt $2b$ hashes  (Sergey Shinderuk <s.shinderuk@postgrespro.ru>)
Re: pgcrypto support for bcrypt $2b$ hashes  (Andreas Karlsson <andreas@proxel.se>)
List pgsql-hackers
Hi Andreas,

> On 1/10/2021, at 12:17 AM, Andreas Karlsson <andreas@proxel.se> wrote:
>
> On 9/28/21 11:58 PM, Daniel Fone wrote:
>>> On 29/09/2021, at 2:33 AM, Daniel Gustafsson <daniel@yesql.se> wrote:
>>> I don't see why not, the best first patches are those scratching an itch.  If
>>> you feel up for it then give it a go, I - and the rest of pgsql-hackers - can
>>> help if you need to bounce ideas.
>> I’m glad you said that. I couldn’t resist trying and have attached a patch. By referencing the respective git logs,
Ididn’t have too much difficulty identifying the material changes in each codebase. I’ve documented all the
postgres-specificchanges to upstream in the header comment for each file. 
>
> I took a quick look and on a cursory glance it looks good but I got these compilation warnings.
>
> crypt-blowfish.c: In function ‘BF_crypt’:
> crypt-blowfish.c:789:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
>  789 |   int   done;
>      |   ^~~
> crypt-blowfish.c: In function ‘_crypt_blowfish_rn’:
> crypt-blowfish.c:897:8: warning: variable ‘save_errno’ set but not used [-Wunused-but-set-variable]
>  897 |  int   save_errno,
>      |        ^~~~~~~~~~

I don’t get these compiler warnings and I can’t find any settings to use that might generate them. I’m compiling on
macOS11.6 configured with `--enable-cassert --enable-depend --enable-debug CFLAGS=-O0` 

I’ve optimistically updated the patch to hopefully address them, but I’d like to know what I need to do to get those
warnings.

Thanks,

Daniel


Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Adding CI to our tree
Next
From: Michael Paquier
Date:
Subject: Re: Memory leak in pg_hmac_final