From 9712e7530997e3927b1d27a9b2f981f1c1b23499 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Tue, 20 Jan 2026 10:57:27 +0000 Subject: [PATCH v1] More Fix accidentally cast away qualifiers --- 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