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 570283 - schema-bindings.c fails to compile
schema-bindings.c fails to compile
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
trunk
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2009-02-02 21:47 UTC by Matt Kraai
Modified: 2009-02-03 02:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (687 bytes, patch)
2009-02-02 21:50 UTC, Matt Kraai
committed Details | Review

Description Matt Kraai 2009-02-02 21:47:57 UTC
When I try to compile Metacity's trunk on a Debian unstable system, it fails with the following error messages:

gcc -DHAVE_CONFIG_H -I. -I.. -I./include -DMETACITY_LIBEXECDIR=\"/usr/local/libexec\" -DHOST_ALIAS=\"\" -DMETACITY_LOCALEDIR=\"/usr/local/share/locale\" -DMETACITY_PKGDATADIR=\"/usr/local/share/metacity\" -DMETACITY_DATADIR=\"/usr/local/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/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/pixman-1 -I/usr/include/gconf/2 -I/usr/include/orbit-2.0      -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wall -Werror -ansi -MT schema-bindings.o -MD -MP -MF .deps/schema-bindings.Tpo -c -o schema-bindings.o `test -f 'core/schema-bindings.c' || echo './'`core/schema-bindings.c
cc1: warnings being treated as errors
core/schema-bindings.c: In function ‘produce_bindings’:
core/schema-bindings.c:140: error: suggest explicit braces to avoid ambiguous ‘else’
core/schema-bindings.c:144: error: suggest explicit braces to avoid ambiguous ‘else’
make[4]: *** [schema-bindings.o] Error 1

These errors both correspond to if statements that contain a g_error call.  g_error expands to G_STMT_START ... G_STMT_END, which expand to "if (1)" and "else (void) 0", respectively.  There are other such constructs in this file, but they avoid the problem by using braces around the call to g_error.
Comment 1 Matt Kraai 2009-02-02 21:50:21 UTC
Created attachment 127795 [details] [review]
Patch
Comment 2 Christian Persch 2009-02-02 23:14:49 UTC
See also bug 507349.
Comment 3 Thomas Thurman 2009-02-03 02:22:00 UTC
Committed with thanks.