From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Jeff Davis <jdavis@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Unicode case mapping tables and functions.
Date: Fri, 8 Mar 2024 10:24:52 +0200
Message-ID: <b20d6d97-7338-48ea-ba33-837a1c8ef98e@iki.fi> (raw)
In-Reply-To: <E1riJFq-002aP8-QF@gemulon.postgresql.org>
References: <E1riJFq-002aP8-QF@gemulon.postgresql.org>
On 07/03/2024 21:18, Jeff Davis wrote:
> Unicode case mapping tables and functions.
With -Wtype-limits, I'm seeing this warning:
unicode_case.c: In function ‘convert_case’:
unicode_case.c:107:47: warning: comparison of unsigned expression in ‘<
0’ is always false [-Wtype-limits]
107 | while (src[srcoff] != '\0' && (srclen < 0 || srcoff <
srclen))
| ^
That seems like legit issue. The comment in unicode_strlower/upper() says:
> * String src must be encoded in UTF-8. If srclen < 0, src must be
> * NUL-terminated.
But srclen is of type size_t, which is unsigned.
--
Heikki Linnakangas
Neon (https://neon.tech)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: hlinnaka@iki.fi, jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Unicode case mapping tables and functions.
In-Reply-To: <b20d6d97-7338-48ea-ba33-837a1c8ef98e@iki.fi>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox