[vorbis-dev] MSVC warnings

Brian Hook brianhook at pyrogon.com
Sat Jan 5 18:27:27 PST 2002



At 02:47 AM 1/6/2002 +0100, you wrote:
> > #ifdef _MSC_VER
> > #pragma warning (disable: 4244)
> > #endif
>
>What's a "4244"?

Another person replied to this already, but I'll just toss out that instead 
of using a pragma, this warning can (portably?) be removed by appropriate 
casting.  This should be fine since, obviously, this is the intended behaviour.

The pragma is simply a stop-gap measure that gets rid of the warnings 
without forcing a lot of code modification.

> > Where appropriate.  I'm also getting a couple warnings of "unary minus
> > operator applied to unsigned type, result still unsigned", in bitwise.c,
> > line 177 and line 209:
> >
> >     ret=-1UL;
>
>If you know a better *portable* way of generating a "negative" unsigned
>number, please tell :-)

Well, you can cast it to get rid of the problem...but (I don't have the 
code with me, so this is conjecture), I assume you could just return ~0L 
and the caller could check for that?  I'm not sure what returning an 
"unsigned -1" is really trying to do in this case.

Brian

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list