[PATCH] size reduction and code clean up for devfsd.c

Bernhard Fischer rep.dot.nop at gmail.com
Wed Jun 27 10:08:14 UTC 2007


On Wed, Jun 27, 2007 at 09:44:39AM +0200, Tito wrote:
>On Wednesday 27 June 2007 02:20:00 Denis Vlasenko wrote:
>> > BTW: I'm seeing a lot of error messages now when compiling busybox:
>> > 
>> > miscutils/devfsd.c: In function ???devfsd_main???:
>> > miscutils/devfsd.c:457: warning: ignoring return value of ???symlink???, declared with attribute warn_unused_result
>> > miscutils/devfsd.c: In function ???copy_inode???:
>> > miscutils/devfsd.c:1062: warning: ignoring return value of ???symlink???, declared with attribute warn_unused_result
>> > miscutils/devfsd.c:1067: warning: ignoring return value of ???chown???, declared with attribute warn_unused_result
>> > 
>> > and so on.... 
>> 
>> Should be coming from your libc.
>Hi,
>the strange thing is that this started when I began to use a fresh copy of busybox svn.
>My old working copy never complained about this errors neither do all other projects
>that I test compiled after seeing this.  I haven't done system upgrades involving
>libc, libc-dev or gcc. I'm using Ubuntu 7.04 (sort of).

These come from -D_FORTIFY_SOURCE=2 (or however it is called) which i
added to make people aware of eventual problems. It's off for WERROR.
Some of the warnings should be fixed, some are ok. It's just ment as a
helper for an audit pass.

I have a patch which flags alot if not all functions in libbb.h to warn
if they return a result but the result is not used.

Is this something we would like to help a general cleanup-pass?

PS: said patch is attached, for reference.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-libbb-warn-unused-result.00.diff
Type: text/x-diff
Size: 27598 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070627/dcecb9c7/attachment-0002.bin 


More information about the busybox mailing list