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 606719 - Fails to build with GCC 4.5
Fails to build with GCC 4.5
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.28.x
Other Linux
: High major
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2010-01-12 09:14 UTC by Josselin Mouette
Modified: 2010-04-01 09:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Possible patch (805 bytes, patch)
2010-02-22 13:49 UTC, Dominique Leuenberger
committed Details | Review

Description Josselin Mouette 2010-01-12 09:14:08 UTC
Metacity fails to build with a trunk version of GCC dated 20100107. This is caused by -Werror stomping on a new warning.

cc -DHAVE_CONFIG_H -I. -I.. -I./include -DMETACITY_LIBEXECDIR=\"/usr/lib/metacity\" -DHOST_ALIAS=\"\" -DMETACITY_LOCALEDIR=\"/usr/share/locale\" -DMETACITY_PKGDATADIR=\"/usr/share/metacity\" -DMETACITY_DATADIR=\"/usr/share\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1 -D_REENTRANT -DORBIT2=1 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/startup-notification-1.0 -I/usr/include/libgtop-2.0      -g -O2 -g -Wall -O2 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wsign-compare -Wall -Werror -ansi -c -o window.o `test -f 'core/window.c' || echo './'`core/window.c
cc1: warnings being treated as errors
core/window.c: In function 'menu_callback':
core/window.c:6463:9: error: case value '0' not in enumerated type 'MetaMenuOp'
make[5]: *** [window.o] Error 1

The solution is probably to add a META_MENU_OP_NONE = 0 in the enum. I have not checked, but this might also be necessary for some other enums.

Note that this also applies to mutter.
Comment 1 Vincent Untz 2010-02-22 11:37:49 UTC
Raising the priority since gcc 4.5 will be used in more and more distributions now.
Comment 2 Dominique Leuenberger 2010-02-22 13:49:27 UTC
Created attachment 154394 [details] [review]
Possible patch

A possible patch. I'm not sure if in this case breaking the enum order of MetaMenuOp is of any importance or causes too much trouble.
Comment 3 Vincent Untz 2010-03-31 20:37:50 UTC
I committed a patch based on this.
Comment 4 Josselin Mouette 2010-04-01 06:36:33 UTC
(In reply to comment #3)
> I committed a patch based on this.

Thanks. Could you commit it to mutter too?
Comment 5 Vincent Untz 2010-04-01 09:55:31 UTC
I'll ask Owen.