Re: Change GUC hashtable to use simplehash? - Mailing list pgsql-hackers

From John Naylor
Subject Re: Change GUC hashtable to use simplehash?
Date
Msg-id CANWCAZaNkuypSBbnM5LXw-q=s8jJei879z57bh_fAisdVpuTMQ@mail.gmail.com
Whole thread Raw
In response to Re: Change GUC hashtable to use simplehash?  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
On Wed, Feb 7, 2024 at 10:41 PM Peter Eisentraut <peter@eisentraut.org> wrote:
>
> /tmp/cirrus-ci-build/src/include/common/hashfn_unstable.h: In function
> ‘int fasthash_accum_cstring_unaligned(fasthash_state*, const char*)’:
> /tmp/cirrus-ci-build/src/include/common/hashfn_unstable.h:201:20:
> warning: comparison of integer expressions of different signedness:
> ‘int’ and ‘long unsigned int’ [-Wsign-compare]
>     201 |   while (chunk_len < FH_SIZEOF_ACCUM && str[chunk_len] != '\0')
>         |                    ^
>
> and a few more like that.
>
> I think it would be better to declare various int variables and
> arguments as size_t instead.  Even if you don't actually need the larger
> range, it would make it more self-documenting.

Thanks for the report! I can reproduce and have pushed that change.



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: glibc qsort() vulnerability
Next
From: Michael Paquier
Date:
Subject: Re: Printing backtrace of postgres processes