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 307038 - nautilus fails to build with gcc4
nautilus fails to build with gcc4
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Background
git master
Other Linux
: Urgent major
: ---
Assigned To: Rodney Dawes
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-06-09 16:45 UTC by Luis Villa
Modified: 2005-06-10 19:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to get the build going (34.56 KB, patch)
2005-06-09 21:30 UTC, Kjartan Maraas
none Details | Review
Proposed patch (add initialization to default case) (619 bytes, patch)
2005-06-10 18:41 UTC, Martin Wehner
none Details | Review

Description Luis Villa 2005-06-09 16:45:28 UTC
nautilus fails to build with gcc4. The exact error:

cc1: warnings being treated as errors
applier.c: In function 'is_nautilus_running':
applier.c:1627: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1627: warning: pointer targets in passing argument 1 of
'__builtin_strcmp' differ in signedness
applier.c:1627: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1627: warning: pointer targets in passing argument 1 of
'__builtin_strcmp' differ in signedness
applier.c:1627: warning: pointer targets in passing argument 1 of
'__builtin_strcmp' differ in signedness
applier.c:1627: warning: pointer targets in passing argument 1 of
'__builtin_strcmp' differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of
'__builtin_strcmp' differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of
'__builtin_strcmp' differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of
'__builtin_strcmp' differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness
applier.c:1628: warning: pointer targets in passing argument 1 of
'__builtin_strcmp' differ in signedness
make[2]: *** [applier.lo] Error 1
make[2]: Leaving directory `/home/louie/cvs/nautilus/libbackground'
Comment 1 Kjartan Maraas 2005-06-09 21:30:15 UTC
Created attachment 47512 [details] [review]
patch to get the build going

This is not production quality. Posting it here mostly to get luis' tinderbox
going again. Comments welcome
Comment 2 Luis Villa 2005-06-09 21:35:18 UTC
I don't apply patches to keep the tinderbox going (except to jhbuild); it has to
get committed :)
Comment 3 Martin Wehner 2005-06-10 02:23:16 UTC
applier.c actually lives in gnome-control-center, the libbackground dir is just
a cvs link into that module. So you have to poke them about this specific error :)
Kjartan, thanks for the patch - I went with disabling the pointer signedness
warnings to avoid all the casting.
Comment 4 Jeroen Zwartepoorte 2005-06-10 08:53:02 UTC
-	gboolean cut;
+	gboolean cut = FALSE;

That fix is actually still necessary for fm-directory-view.c and fm-tree-view.c.
Comment 5 Martin Wehner 2005-06-10 18:36:28 UTC
I fixed the cut initialization in a slightly different way. The only remaining
issue with nautilus compiling on gcc4 is applier.c.
Comment 6 Martin Wehner 2005-06-10 18:41:48 UTC
Created attachment 47561 [details] [review]
Proposed patch (add initialization to default case)
Comment 7 Kjartan Maraas 2005-06-10 18:49:24 UTC
I commited fixes for this in libbackground now. Please test.
Comment 8 Kjartan Maraas 2005-06-10 18:51:30 UTC
Oh. I didn't see your patch before commiting. Is there any practical difference
between doing it at declaration time?

GdkRectangle src_geom = { 0, }; etc?
Comment 9 Martin Wehner 2005-06-10 19:10:31 UTC
No, no real practical difference. But I think it's cleaner to fix the function
which is supposed to initialize the values than patching up the caller. After
all the function doesn't live up to its contract and if the function is used
from different places, you just need to fix one place, not every caller.
And yes, it builds smoothly now - Thanks.