Skip to content

Fix build with Clang

Jente Hidskes requested to merge t6:master into master

Created by: t6

I'm trying to update the FreeBSD package of gcolor3 and the build fails with

../src/gcolor3-color-row.c:88:6: error: implicit conversion from enumeration type 'GtkStateType' to different enumeration type 'GtkStateFlags' [-Werror,-Wenum-conversion]
                                        GTK_STATE_NORMAL,
                                        ^~~~~~~~~~~~~~~~

Looks like Clang is more pedantic here than GCC.

I believe that we should use GTK_STATE_FLAG_NORMAL instead. Also see https://developer.gnome.org/gtk3/stable/GtkStyleContext.html#gtk-style-context-get-property https://developer.gnome.org/gtk3/stable/gtk3-Standard-Enumerations.html#GtkStateFlags

Merge request reports