After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755659 - Fix -Werror build for clang
Fix -Werror build for clang
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: building
3.18.x
Other FreeBSD
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 760350
Blocks:
 
 
Reported: 2015-09-26 10:34 UTC by Ting-Wei Lan
Modified: 2016-02-25 18:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Fix build with clang -Werror (1.40 KB, patch)
2015-09-26 10:36 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2015-09-26 10:34:37 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.
Comment 1 Ting-Wei Lan 2015-09-26 10:36:38 UTC
Created attachment 312186 [details] [review]
build: Fix build with clang -Werror
Comment 2 Ting-Wei Lan 2015-12-08 18:40:55 UTC
Does someone have time to review this patch?
Comment 3 Jasper St. Pierre (not reading bugmail) 2015-12-08 19:32:57 UTC
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+?
Comment 4 Ting-Wei Lan 2015-12-08 19:34:18 UTC
No, GTK+ doesn't use AX_COMPILER_FLAGS.
Comment 5 Jasper St. Pierre (not reading bugmail) 2015-12-08 19:36:33 UTC
I would prefer to keep gtkactionmuxer.c mostly in sync between the two repos.
Comment 6 Ting-Wei Lan 2016-01-10 16:27:45 UTC
(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+.
Comment 7 Ting-Wei Lan 2016-01-24 13:37:12 UTC
Can the patch be reviewed again? The needed GTK+ change is already pushed.
Comment 8 Jasper St. Pierre (not reading bugmail) 2016-02-25 17:58:35 UTC
Review of attachment 312186 [details] [review]:

As long as it's in sync with GTK+.
Comment 9 Ting-Wei Lan 2016-02-25 18:09:56 UTC
Attachment 312186 [details] pushed as 1de288c - build: Fix build with clang -Werror