Re: pgsql: Unicode case mapping tables and functions.
| От | Heikki Linnakangas |
|---|---|
| Тема | Re: pgsql: Unicode case mapping tables and functions. |
| Дата | |
| Msg-id | b20d6d97-7338-48ea-ba33-837a1c8ef98e@iki.fi обсуждение исходный текст |
| Ответ на | pgsql: Unicode case mapping tables and functions. (Jeff Davis <jdavis@postgresql.org>) |
| Ответы |
Re: pgsql: Unicode case mapping tables and functions.
|
| Список | pgsql-committers |
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)
В списке pgsql-committers по дате отправления: