GNOME Bugzilla – Bug 755659
Fix -Werror build for clang
Last modified: 2016-02-25 18:10:10 UTC
The attached patch fixes following warnings when compiling with clang: shell-glsl-quad.c:86:35: error: implicit conversion from enumeration type 'ShellSnippetHook' to different enumeration type 'CoglSnippetHook' [-Werror,-Wenum-conversion] snippet = cogl_snippet_new (hook, declarations, NULL); ~~~~~~~~~~~~~~~~ ^~~~ shell-glsl-quad.c:91:35: error: implicit conversion from enumeration type 'ShellSnippetHook' to different enumeration type 'CoglSnippetHook' [-Werror,-Wenum-conversion] snippet = cogl_snippet_new (hook, declarations, code); ~~~~~~~~~~~~~~~~ ^~~~ 2 errors generated. gtkactionmuxer.c:142:10: error: cast from 'gchar *' (aka 'char *') to 'gchar **' (aka 'char **') increases required alignment from 1 to 8 [-Werror,-Wcast-align] return (gchar **) g_array_free (actions, FALSE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
Created attachment 312186 [details] [review] build: Fix build with clang -Werror
Does someone have time to review this patch?
Review of attachment 312186 [details] [review]: ::: src/gtkactionmuxer.c @@ -140,3 @@ } - return (gchar **) g_array_free (actions, FALSE); Did you file a similar patch in GTK+?
No, GTK+ doesn't use AX_COMPILER_FLAGS.
I would prefer to keep gtkactionmuxer.c mostly in sync between the two repos.
(In reply to Jasper St. Pierre from comment #3) > Review of attachment 312186 [details] [review] [review]: > > ::: src/gtkactionmuxer.c > @@ -140,3 @@ > } > > - return (gchar **) g_array_free (actions, FALSE); > > Did you file a similar patch in GTK+? This patch was pushed to GTK+.
Can the patch be reviewed again? The needed GTK+ change is already pushed.
Review of attachment 312186 [details] [review]: As long as it's in sync with GTK+.
Attachment 312186 [details] pushed as 1de288c - build: Fix build with clang -Werror