compilation warnings: 'pointer targets ... differ in signedness'

Rob Landley rob at landley.net
Thu Oct 6 19:06:24 UTC 2005


On Tuesday 04 October 2005 13:23, Larry Doolittle wrote:
> 99% of what you do with chars has nothing to do with whether or
> not they're signed.  The point of the C standard standing mute
> on the default signedness is that the compiler can tune for whatever
> is more efficient.  So in 99% of our uses, busybox should leave it
> unspecified.

By that logic, short and int should also be of indeterminate sign.

> Blanket declaration of all chars as unsigned (or signed, for that
> matter) is, well, counter to the philosophy of C.

The philosophy of C?

Keep in mind that this mess originated from machines that had chars as long as 
4 bytes.  Is depending on char to be 1 byte also counter to the philosophy of 
C?  (We do that in _lots_ of places.)

> I could generate a patch that cleans up that part of busybox
> according to my perspective.  Would anyone read it if I took the time?

I wouldn't, but someone else might.

I only really care if new compilers start spitting out fresh warnings.  I'm 
still using gcc 3.3 on my laptop, but plan to upgrade before too long.

>      - Larry

Rob



More information about the busybox mailing list