Re: Change GUC hashtable to use simplehash?

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Junwang Zhao <zhjwpku(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gurjeet Singh <gurjeet(at)singh(dot)im>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Change GUC hashtable to use simplehash?
Date: 2024-02-08 03:11:53
Message-ID: CANWCAZaNkuypSBbnM5LXw-q=s8jJei879z57bh_fAisdVpuTMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 7, 2024 at 10:41 PM Peter Eisentraut <peter(at)eisentraut(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-02-08 03:25:18 Re: Printing backtrace of postgres processes
Previous Message Nathan Bossart 2024-02-08 03:08:26 Re: glibc qsort() vulnerability