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 340117 - gnome-keyring does not build on solaris due to cast warnings and -Werror
gnome-keyring does not build on solaris due to cast warnings and -Werror
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: general
git master
Other opensolaris
: Normal normal
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-04-29 15:32 UTC by James Andrewartha
Modified: 2007-05-10 22:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description James Andrewartha 2006-04-29 15:32:14 UTC
http://jhbuild.bxlug.be/builds/2006-04-29-0005/logs/gnome-keyring/#build

gnome-keyring does some of casting from guchar* to guint32*, along with some other implicit casting involving GArray which involved a twisty maze of macros. Anyway, the net result is the alignment of structs is more strict on Solaris, so adding -Wno-cast-align at the bottom of configure.in fixes that.

The warnings about formats:
gnome-keyring-daemon-io.c: In function `gnome_keyring_client_state_machine':
gnome-keyring-daemon-io.c:369: warning: unsigned int format, uid_t arg (arg 4)
gnome-keyring-daemon-io.c:369: warning: unsigned int format, uid_t arg (arg 5)
and 
gnome-keyring-daemon.c: In function `main':
gnome-keyring-daemon.c:2779: warning: int format, pid_t arg (arg 2)
gnome-keyring-daemon.c:2801: warning: int format, pid_t arg (arg 2)
gnome-keyring-daemon.c:2808: warning: int format, pid_t arg (arg 2)

I'm not sure how to get rid of these without -Wno-format, as by default on SPARC/Solaris they're #defined as long for 32bit code, which is 4 bytes long. Compiling with -m64 would #define them as int, which would still be 4 bytes long, but the right type for the format string. Possibly cast the uid_t and pid_t to int?

http://www-128.ibm.com/developerworks/library/l-solar/ is a useful reference for this sort of stuff.
Comment 1 Stef Walter 2007-05-10 22:10:42 UTC
Committed fixes for the casting. If you have a patch which fixes the first build problem, please attach. Thanks!