[patch] 1.11.0.svn: compiler warnings when building for i386 arch)

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Wed May 14 19:42:30 UTC 2008


On Tue, 13 May 2008, Denys Vlasenko wrote:

> 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: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?

Didn't touch that.
But that warning seems to have gone away now.  Looks like latest revision
fixed that.  Still, I noticed some more warnings show up when I use
-Wconversion:

archival/libunarchive/get_header_tar.c: In function 'get_header_tar':
archival/libunarchive/get_header_tar.c:158: warning: passing argument 2 of
'lseek' with different width due to prototype
archival/libunarchive/get_header_tar.c:289: warning: passing argument 1 of
'xzalloc' with different width due to prototype
archival/libunarchive/get_header_tar.c:291: warning: passing argument 3 of
'xread' with different width due to prototype
archival/libunarchive/get_header_tar.c:299: warning: passing argument 1 of
'xzalloc' with different width due to prototype
archival/libunarchive/get_header_tar.c:300: warning: passing argument 3 of
'xread' with different width due to prototype


Cheers,

-- 
Cristian



More information about the busybox mailing list