compilation warnings: 'pointer targets ... differ in signedness'
Rob Landley
rob at landley.net
Sun Sep 25 05:34:14 UTC 2005
On Saturday 24 September 2005 22:21, Mike Frysinger wrote:
> not really ... sometimes it can safely be ignored, but globally adding
> -funsigned-char is wrong ... if you're using a char and rely on it being
> signed, -funsigned-char will break that
If you're using a char and relying on it being signed, that's never been
portable. (I don't know if c99 finally got around to specifying it.)
A normal character string is "char *". I don't think a pointer to a string
literal is going to give you "unsigned char *", is it? Yet I looked at
loop.c and the API was feeding strings into something defined in linux/loop.h
as "unsigned char *", and I went to great lengths to actually get us to the
point where we were using the proper #include for that because the
alternative was a nightmare.
Now we can stick in explicit casts to make the warnings shut up, but how is
that an improvement?
Rob
More information about the busybox
mailing list