[PATCH] fix minor bugs in hdparm and don't block when reading
from stdin
Rob Landley
rob at landley.net
Thu Jun 8 07:13:09 PDT 2006
On Thursday 08 June 2006 2:05 am, Tito wrote:
> Hi,
> root at localhost:/dev/pts/2:/root/Desktop/busybox# make
> CC miscutils/hdparm.o
> /root/Desktop/busybox/miscutils/hdparm.c: In function ‘hdparm_main’:
> /root/Desktop/busybox/miscutils/hdparm.c:2190: warning: implicit
> declaration of function ‘identify_from_stdin’ AR cru miscutils/miscutils.a
> LINK busybox_unstripped
> STRIP busybox
> root at localhost:/dev/pts/2:/root/Desktop/busybox#
>
> The if(ENABLE) would better be an #if ENABLE to avoid the above error
> message please fix it.
Sigh. That's a _really_ stupid warning. Isn't it nice how gcc gets mad if
you prototype a static function you don't declare (which is why the prototype
has to be in the #ifdef), and yet it's not smart enough to optimize out a
static function that is never used? And of course you can't prototype it
without the "static" keyword and then declare it static because that doesn't
match, even though it's scope information rather than type information so it
doesn't MATTER either...
So the logical move to handle these deficiencies in gcc is to add an extra
flag to tell it to warn about unprototyped functions, which is NOT A BUG. Of
course.
Right, with the venting out of the way...
svn 15340.
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list