Merge branch 'gunicode-fix' into 'main'

gunicode.h: fix warning with -Wcast-qual for define g_utf8_next_char()

See merge request GNOME/glib!4016
This commit is contained in:
Philip Withnall 2024-04-23 11:45:52 +00:00
commit 21617108b3
2 changed files with 4 additions and 2 deletions

View File

@ -806,7 +806,7 @@ GLIB_VAR const gchar * const g_utf8_skip;
* Before using this macro, use g_utf8_validate() to validate strings
* that may contain invalid UTF-8.
*/
#define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(const guchar *)(p)])
#define g_utf8_next_char(p) ((p) + g_utf8_skip[*(const guchar *)(p)])
GLIB_AVAILABLE_IN_ALL
gunichar g_utf8_get_char (const gchar *p) G_GNUC_PURE;

View File

@ -169,7 +169,9 @@ glib_tests = {
'tree' : {},
'types' : {},
'utf8-performance' : {},
'utf8-pointer' : {},
'utf8-pointer' : {
'c_args' : cc.get_id() == 'gcc' ? ['-Werror=cast-qual'] : [],
},
'utf8-validate' : {},
'utf8-misc' : {},
'utils' : {