svn commit: trunk/busybox/coreutils

Bernhard Fischer rep.nop at aon.at
Sat Sep 23 11:56:25 UTC 2006


On Fri, Sep 22, 2006 at 12:11:59PM -0700, landley at busybox.net wrote:
>Author: landley
>Date: 2006-09-22 12:11:59 -0700 (Fri, 22 Sep 2006)
>New Revision: 16192
>
>Log:
>Follow-up to 16172: this also doesn't produce a warning for me on gcc 4.1,
>without having to feed the compiler nonsense.

You aren't being defiant, are you?

Read the code.

/tmp/busybox/coreutils/uudecode.c: In function 'uudecode_main':
/tmp/busybox/coreutils/uudecode.c:144: warning: 'decode_fn_ptr' may be
used uninitialized in this function

me at there$ for i in 2.95 3.3 3.4 4.0 4.1;do echo gcc-$i;make CC=gcc-$i ; mv
coreutils/uudecode.o coreutils/uudecode.o.ok-$i;done
gcc-2.95
  CC coreutils/uudecode.o
  AR cru coreutils/coreutils.a
  LINK busybox_unstripped
  STRIP busybox
gcc-3.3
  CC coreutils/uudecode.o
  AR cru coreutils/coreutils.a
  LINK busybox_unstripped
  STRIP busybox
gcc-3.4
  CC coreutils/uudecode.o
  AR cru coreutils/coreutils.a
  LINK busybox_unstripped
  STRIP busybox
gcc-4.0
  CC coreutils/uudecode.o
  AR cru coreutils/coreutils.a
  LINK busybox_unstripped
  STRIP busybox
gcc-4.1
  CC coreutils/uudecode.o
  AR cru coreutils/coreutils.a
  LINK busybox_unstripped
  STRIP busybox
me at there:/tmp/busybox$ rm -f coreutils/uudecode.c ; svn up
coreutils/uudecode.c
Restored 'coreutils/uudecode.c'
At revision 16195.
me at there:/tmp/busybox$ for i in 2.95 3.3 3.4 4.0 4.1;do echo gcc-$i;make
CC=gcc-$i ; mv coreutils/uudecode.o coreutils/uudecode.o.nak-$i;done
gcc-2.95
  CC coreutils/uudecode.o
cc1: warnings being treated as errors
/tmp/busybox/coreutils/uudecode.c: In function `uudecode_main':
/tmp/busybox/coreutils/uudecode.c:144: warning: `decode_fn_ptr' might be
used uninitialized in this function
make[1]: *** [/tmp/busybox/coreutils/uudecode.o] Error 1
make: *** [_all] Error 2
mv: cannot stat `coreutils/uudecode.o': No such file or directory
gcc-3.3
  CC coreutils/uudecode.o
  AR cru coreutils/coreutils.a
  LINK busybox_unstripped
  STRIP busybox
gcc-3.4
  CC coreutils/uudecode.o
  AR cru coreutils/coreutils.a
  LINK busybox_unstripped
  STRIP busybox
gcc-4.0
  CC coreutils/uudecode.o
  AR cru coreutils/coreutils.a
  LINK busybox_unstripped
  STRIP busybox
gcc-4.1
  CC coreutils/uudecode.o
/tmp/busybox/coreutils/uudecode.c: In function 'uudecode_main':
/tmp/busybox/coreutils/uudecode.c:144: warning: 'decode_fn_ptr' may be
used uninitialized in this function
  AR cru coreutils/coreutils.a
  LINK busybox_unstripped
  STRIP busybox
me at there:/tmp/busybox$ 

What version of gcc-4.1 do you have?
How do you use gcc-4.1 to compile busybox?
Reverting that fix in the face of you having added -Werror is not a
sensible thing to do. YMMV

Regards,



More information about the busybox mailing list