Skip to content
  • Hannes Müller's avatar
    gunicode.h: fix warning with -Wcast-qual for define g_utf8_next_char() · c583162c
    Hannes Müller authored
    The define for g_utf8_next_char(p) includes a not needed final cast to
    (char *). In fact, this cast has the adverse effect of causing a warning
    if p is a (const char *) with gcc/clang compiler option -Wcast-qual.
    So lets remove the not needed cast and add option -Werror=cast-qual
    to glib/tests/utf8-pointer.c which uses g_utf8_next_char().
    Now utf8-pointer.c compiles also with compiler option -Werror=cast-qual
    and passes all tests.
    c583162c