compilation warnings: 'pointer targets ... differ in signedness'
Rob Landley
rob at landley.net
Tue Oct 4 17:22:54 UTC 2005
On Tuesday 04 October 2005 03:41, Ihno Krumreich wrote:
> > 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.)
[example omitted]
> So relying on the signedness of a char is a _very_ bad idea.
...
> > Now we can stick in explicit casts to make the warnings shut up, but how
> > is that an improvement?
>
> If possible dont use type casts. If used in the wrong place, you just
> hide the possible bugs.
Agreed on both counts.
This gets us back to telling the compiler what behavior we actually want,
which would be adding -funsigned-char to our makefile.
This sound sane to everybody else?
Rob
More information about the busybox
mailing list