When using this compiler option:
CFLAGS += -Wbad-function-cast
I see several warnings (as in Subject:) while compiling miscutils/dc.c.
One of them in function 'mod'. Applying this patch:
diff --git a/miscutils/dc.c b/miscutils/dc.c
index cb4b1e9..f9b8ab2 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -74,8 +74,9 @@ static void divide(void)
static void mod(void)
{
unsigned d = pop();
+ unsigned c = pop();
- push((unsigned) pop() % d);
+ push(c % d);
}
static void and(void)
makes that warning go away, but bloats the result by a few bytes.
What do people think? Shall we blame gcc again for stupidity? Or maybe
not.
Cheers,
--
Cristian
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox