Bug 28093

Summary: lots of compilation warnings on Debian SID
Product: systemd Reporter: Holger Schurig <holgerschurig>
Component: generalAssignee: Lennart Poettering <lennart>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: compilation log with lot's of warnings
compilation log with even more of warnings, after manually configuring

Description Holger Schurig 2010-05-13 12:28:23 UTC
Created attachment 35637 [details]
compilation log with lot's of warnings

I just got systemd via git (31cee6f634ce07aa2c3514a506f93830f91f14a5) and did the initial ./bootstrap.sh && make. But now I got tons of warnings with Debian SIDs version of gcc ("gcc (Debian 4.4.4-1) 4.4.4").

One warning must be an error in the Makefile.am (overriding commands for target `systemd-interfaces.c').

Some warnings are from code generated by valac ("Vala 0.8.1").

But others seem related to System D's own code, I'm attaching a log.
Comment 1 Lennart Poettering 2010-05-13 12:30:45 UTC
We are are aware of these warnings, they are caused by the vala generated C code. They aren't easy to fix and must probably be fixed in the Vala compiler, not systemd.
Comment 2 Holger Schurig 2010-05-13 12:32:50 UTC
Created attachment 35638 [details]
compilation log with even more of warnings, after manually configuring

The difference to the other log is that now I a manual configuration step before compilation:

./bootstrap.sh && ./configure --sysconfdir=/etc --localstatedir=/var && make
Comment 3 Holger Schurig 2010-05-13 12:36:23 UTC
(In reply to comment #1)
> We are are aware of these warnings, they are caused by the vala generated C
> code. They aren't easy to fix and must probably be fixed in the Vala compiler,
> not systemd.

You've been to fast with your answer ... or I was too slow attaching the second attachment. Now I have warnings in *.c files (e.g. mount-setup.c) which are not derived from *.vala files.


Hehe, Qt's moc/uic does a better job than valac :-)
Comment 4 Zbigniew Jedrzejewski-Szmek 2010-09-01 10:40:23 UTC
Warnings from strchr() are bogus:
src/util.c: In function ‘delete_chars’:                                                            
src/util.c:934: warning: logical ‘&&’ with non-zero constant will always evaluate as true [-Wlogical-op]
src/util.c: In function ‘xescape’:
src/util.c:1342: warning: logical ‘&&’ with non-zero constant will always evaluate as true [-Wlogical-op]
src/util.c: In function ‘chars_intersect’:
src/util.c:1638: warning: logical ‘&&’ with non-zero constant will always evaluate as true [-Wlogical-op]
src/util.c: In function ‘ask’:
src/util.c:1902: warning: logical ‘&&’ with non-zero constant will always evaluate as true [-Wlogical-op]

This is gcc bug, fixed in 4.5:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36513
Comment 5 Lennart Poettering 2012-07-28 11:34:54 UTC
We split the Vala code off systemd into its own project systemd-ui. It is compiled with less drastic gcc options, so that both the systemd and the systemd-ui build should be entirely clean now. Closing. 

Please file a new bug if either project still generates warnings.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.