GNOME Bugzilla – Bug 640537
Last commit change to src/core/main.c makes mutter unbuildable
Last modified: 2011-01-25 13:10:33 UTC
The last change to src/core/main.c from 24th January makes mutter unbuildable in jhbuild The error is: CC main.o cc1: warnings being treated as errors core/main.c: In function ‘sigterm_handler’: core/main.c:445: error: ignoring return value of ‘write’, declared with attribute warn_unused_result make[4]: *** [main.o] Error 1 With the old code I am able to build. The changes are: git diff 48b9807c86d520b4b007dd0a438f3c5d72a9a477..4f079affea4a9d55a97c7150c2973c69166bc64e src/core/main.c diff --git a/src/core/main.c b/src/core/main.c index 9efb549..1ea6f5d 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -442,9 +442,7 @@ sigterm_handler (int signum) { if (sigterm_pipe_fds[1] >= 0) { - int dummy; - - dummy = write (sigterm_pipe_fds[1], "", 1); + (void) write (sigterm_pipe_fds[1], "", 1); close (sigterm_pipe_fds[1]); sigterm_pipe_fds[1] = -1; }
Just read carefully the commit log and bug #640469. It was meant to fix GCC 4.6 warnings for unused variables. The new code breaks in gcc 4.4.3 under Trisquel: gcc --version gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*** This bug has been marked as a duplicate of bug 640508 ***