[patch] 1.11.0.svn: compiler warnings when building for i386 arch)
Denys Vlasenko
vda.linux at googlemail.com
Mon May 12 18:59:07 PDT 2008
On Monday 12 May 2008 20:58, Cristian Ionescu-Idbohrn wrote:
> > > archival/libunarchive/get_header_tar.c: In function 'get_header_tar':
> > > archival/libunarchive/get_header_tar.c:148: warning: comparison is always
> > > false due to limited range of data type
> >
> > Which line is it? In my tree, line 148 is this one:
> >
> > #if ENABLE_FEATURE_TAR_GZIP
> > if (tar.name[0] == 0x1f && tar.name[1] == 0x8b) { /* gzip */
> > get_header_ptr = get_header_tar_gz;
> > } else <============================ LINE 148
> > #endif
>
> Yes. Sorry about that. That's a patched file in my tree. This is the
> svn source:
>
> archival/libunarchive/get_header_tar.c: In function 'get_header_tar':
> archival/libunarchive/get_header_tar.c:146: warning: comparison is always
> false due to limited range of data type
So it is "if (tar.name[0] == 0x1f && tar.name[1] == 0x8b)".
Hmm... it ought to be "tar.name[1] == 0x8b" with char being a signed type.
but we pass -funsigned-char to gcc, specially for such occasions.
Did you remove it?
--
vda
More information about the busybox
mailing list