GNOME Bugzilla – Bug 721034
glib 2.38.2 cannot be compiled with SunStudio Compiler under Solaris
Last modified: 2013-12-25 22:18:28 UTC
Created attachment 264871 [details] [review] Patch to fix compilation problem If you try to compile "glib" with SunStudio 12.3 under Solaris the build failed with this message: "gfile.c", line 7630: void function cannot return value The problem is that the function g_file_measure_disk_usage_async tries to return a non-void value although the function is declared to return "void". I've attached a patch which fixes this.
Review of attachment 264871 [details] [review]: Looks good, thanks.
https://git.gnome.org/browse/glib/commit/?id=091e466095c47f60ef5b2b0c81459615169216cf
We could use some -Werror=return-type...
Turns out that this doesn't warn, because returning a void expression from a function with a void return type is perfectly valid ISO C. Seems that sunstudio is the one in the wrong here... oh well...