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 721034 - glib 2.38.2 cannot be compiled with SunStudio Compiler under Solaris
glib 2.38.2 cannot be compiled with SunStudio Compiler under Solaris
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.38.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-12-25 11:45 UTC by Matthias Scheler
Modified: 2013-12-25 22:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix compilation problem (930 bytes, patch)
2013-12-25 11:45 UTC, Matthias Scheler
accepted-commit_now Details | Review

Description Matthias Scheler 2013-12-25 11:45:54 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.
Comment 1 Colin Walters 2013-12-25 18:58:56 UTC
Review of attachment 264871 [details] [review]:

Looks good, thanks.
Comment 3 Allison Karlitskaya (desrt) 2013-12-25 21:32:08 UTC
We could use some -Werror=return-type...
Comment 4 Allison Karlitskaya (desrt) 2013-12-25 22:18:28 UTC
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...