public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bertrand Drouvot <[email protected]>
Subject: [PATCH v1] More Fix accidentally cast away qualifiers
Date: Tue, 20 Jan 2026 10:57:27 +0000
---
src/backend/access/spgist/spgquadtreeproc.c | 8 ++++----
src/common/unicode/case_test.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
66.9% src/backend/access/spgist/
33.0% src/common/unicode/
diff --git a/src/backend/access/spgist/spgquadtreeproc.c b/src/backend/access/spgist/spgquadtreeproc.c
index 1b907d9186b..430e802cf80 100644
--- a/src/backend/access/spgist/spgquadtreeproc.c
+++ b/src/backend/access/spgist/spgquadtreeproc.c
@@ -145,8 +145,8 @@ spg_quad_choose(PG_FUNCTION_ARGS)
static int
x_cmp(const void *a, const void *b, void *arg)
{
- Point *pa = *(Point **) a;
- Point *pb = *(Point **) b;
+ Point *pa = *(Point *const *) a;
+ Point *pb = *(Point *const *) b;
if (pa->x == pb->x)
return 0;
@@ -156,8 +156,8 @@ x_cmp(const void *a, const void *b, void *arg)
static int
y_cmp(const void *a, const void *b, void *arg)
{
- Point *pa = *(Point **) a;
- Point *pb = *(Point **) b;
+ Point *pa = *(Point *const *) a;
+ Point *pb = *(Point *const *) b;
if (pa->y == pb->y)
return 0;
diff --git a/src/common/unicode/case_test.c b/src/common/unicode/case_test.c
index 2144219e178..fb159c1c27c 100644
--- a/src/common/unicode/case_test.c
+++ b/src/common/unicode/case_test.c
@@ -55,7 +55,7 @@ initcap_wbnext(void *state)
while (wbstate->offset < wbstate->len &&
wbstate->str[wbstate->offset] != '\0')
{
- char32_t u = utf8_to_unicode((unsigned char *) wbstate->str +
+ char32_t u = utf8_to_unicode((const unsigned char *) wbstate->str +
wbstate->offset);
bool curr_alnum = pg_u_isalnum(u, wbstate->posix);
--
2.34.1
--1ZnbfCRkwVrWsguI--
view thread (2+ messages)
reply
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: [email protected]
Cc: [email protected]
Subject: Re: [PATCH v1] More Fix accidentally cast away qualifiers
In-Reply-To: <no-message-id-77506@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox