> On Nov 13, 2026, at 17:36, Peter Eisentraut <[email protected]> wrote:
> 
> On 05.11.26 06:39, Chao Li wrote:
>>> Ok, what platform and libreadline/libedit version is this?  (It's 
>>> apparently not covered on CI.)
>>> 
>> It's MacOS 26.6.2 on arm64, using Apple’s system libedit. otool -L reports 
>> current version 3.0.0 and compatibility version 2.0.0:
> Here is an updated patch set.  It needed a bit of rebasing over this week's 
> security fixes.  And I included a fix for the macOS libedit issue.
> <v2-0001-Fix-accidentally-casting-away-const.patch><v2-0002-Fix-Wcast-qual-warning-in-lnext.patch><v2-0003-Fix-Wcast-qual-warning-in-foreach_delete_current.patch><v2-0004-Fix-Wcast-qual-warning-in-XLogInsertRecord.patch><v2-0005-Fix-Wcast-qual-warnings-in-regex-module.patch><v2-0006-Fix-Wcast-qual-warning-in-guc_funcs.c.patch><v2-0007-Fix-Wcast-qual-warnings-in-psql.patch><v2-0008-Add-unconstify_pointee.patch><v2-0009-Fix-Wcast-qual-warnings-in-read-write-accessor-ma.patch><v2-0010-Adjust-unconstify-unvolatize-to-avoid-Wcast-qual-.patch><v2-0011-Add-warning-option-Wcast-qual.patch>

Thanks for updating the patch. With v2, my local build passed without any 
warning.

I also went through the patch set again, no more finding. So, v2 overall looks 
good to me.

A nitpick on 0009:
```
 #define ARR_DIMS(a) \
-               ((int *) (((char *) (a)) + sizeof(ArrayType)))
+               ((int *) ((unconstify(char *, (const char *) (a))) + 
sizeof(ArrayType)))
 #define ARR_LBOUND(a) \
-               ((int *) (((char *) (a)) + sizeof(ArrayType) + \
+               ((int *) ((unconstify(char *, (const char *) (a))) + 
sizeof(ArrayType) + \
                                  sizeof(int) * ARR_NDIM(a)))
 
 #define ARR_NULLBITMAP(a) \
                (ARR_HASNULL(a) ? \
-                (uint8 *) (((char *) (a)) + sizeof(ArrayType) + \
+                (uint8 *) ((unconstify(char *, (const char *) (a))) + 
sizeof(ArrayType) + \
                                        2 * sizeof(int) * ARR_NDIM(a)) \
                 : (uint8 *) NULL)
```

For these three macros, unconstify() already wraps its result in parentheses, 
so the additional parentheses around the unconstify() calls are unnecessary. 
For example, ARR_DIMS() could be simplified to:
```
#define ARR_DIMS(a) \
             ((int *) (unconstify(char *, (const char *) (a)) + 
sizeof(ArrayType)))
```

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/






Reply via email to