GNOME Bugzilla – Bug 603510
Build failure due sigterm_handler function: error: ignoring return value of ‘write’
Last modified: 2017-09-29 20:05:19 UTC
From jhbuild log: cc1: warnings being treated as errors core/main.c: In function ‘sigterm_handler’: core/main.c:380: error: ignoring return value of ‘write’, declared with attribute warn_unused_result
I see this as well
Created attachment 149385 [details] [review] fix the compiler warning, make use of the return value googling I found this elegant solution of using the return value for something, thus bringing remedy for the compiler warning. Am I not sneaky? :) Not sure if you want this error logged or printed to stderr, as I did.
gcc version 4.4.1
Review of attachment 149385 [details] [review]: Sorry for the ridiculously long delay. I'll try to do better in future. I actually found and fixed this bug independently, a month after you raised it (in commit 575f5): http://git.gnome.org/browse/metacity/commit/?id=575f5204 But I think your solution is better, so I'm adopting it instead.
Checked into master: http://git.gnome.org/browse/metacity/commit/?id=5389959edc3372fe43caf2230f6922c35c8b04e6 -> FIXED
Hey, The commit mentioned in comment 5 isn't actually valid. It's illegal (can lead to crashes or deadlocks) to call g_printerr in a signal handler.