[Ffmpeg-devel] Compiler warnings

Erik Slagter erik
Thu Feb 2 12:46:44 CET 2006


On Thu, 2006-02-02 at 11:15 +0000, M?ns Rullg?rd wrote:
> >> I can think of cases where a signed/unsigned difference could cause
> >> unexpected behavior, but these are rare.
> >
> > Grmbl. If char's would have been unsigned by default, since the
> > beginning, imho this "warning" problem wouldn't have been there at all.
> > What would have driven the person that invented this? :-(
> 
> The cases I was thinking of are not limited to 8-bit types.  Anything involving
> arithmetic on numbers with the top bit set can give strange results if the
> signed and unsigned types are mixed.

Yes, you're right, but the "char" case is the most disturbing one and
also the one that generates most warnings. IMHO mixing signed and
unsigned ints, shorts, longs is always questionable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2771 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060202/0fc5f48f/attachment.bin>



More information about the ffmpeg-devel mailing list