pgsql: Fix -Wcast-qual warnings in regex module
Fix -Wcast-qual warnings in regex module
- Replace some casts with unconstify() where appropriate.
- Make pg_regex_t.re_fns pointer to const, because the "functions" it
points to is also const.
- Define VS() to a no-op. The default definition of casting
to (void *) might cast away a qualifier. This construct is only
needed for supporting ancient C, so we don't need it.
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: /messages/by-id/70b86618-4038-4b19-8847-1a400d99d477@eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0ddda120e08215c43ffaabbc939ead70b2afe3e7
Modified Files
--------------
src/backend/regex/regexec.c | 6 +++---
src/backend/regex/regfree.c | 2 +-
src/include/regex/regcustom.h | 1 +
src/include/regex/regex.h | 2 +-
src/include/regex/regguts.h | 2 +-
5 files changed, 7 insertions(+), 6 deletions(-)