openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] Visual Studio 2k5 beta 2 generates 1000 warnings com


From: Florian Kainz
Subject: Re: [Openexr-devel] Visual Studio 2k5 beta 2 generates 1000 warnings compiling OpenEXR...
Date: Tue, 30 Aug 2005 11:26:52 -0700
User-agent: Mozilla Thunderbird 1.0 (X11/20041207)

Don't panic.  We have known for a while that Visual Studio likes
to complain about our code, we have looked at the warnings, and we
will eventually fix them.  We have tested the code extensively, and
it does run fine in 32-bit and 64-bit environments.  Most of the
warnings flag either problems that are of a more theoretical nature
or things that are not actually problems.

Regarding your examples:

> d:\openexr\imath\imathvec.h(412) : warning C4290: C++
> exception specification ignored except to indicate a
> function is not __declspec(nothrow)

This warning indicates a defect in the compiler, not in the code.
The compiler is ignoring a perfectly valid throw specification.

> d:\openexr\ilmimf\imftileoffsets.cpp(80) : warning
> C4018: '<' : signed/unsigned mismatch

As far as I can tell the code here is fine; I don't see how
the signed/unsigned mismatch could cause the code to fail.

> d:\openexr\ilmimf\imftiledoutputfile.cpp(1085) :
> warning C4244: 'initializing' : conversion from '__w64
> int' to 'int', possible loss of data

Strictly speaking, this warning is valid; dataSize should be
of a type with at least as many bits as ptrdiff_t.  However,
in order to cause the code to fail, a single tile would have
to contain more than 2 GBytes of pixel data.  (For a 16-bit
RGBA image a single tile would have to be larger than 16,000
by 16,000 pixels.)

> d:\openexr\ilmimf\imfstdio.cpp(157) : warning C4244:
> 'argument' : conversion from 'Imf::Int64' to
> 'std::streamoff', possible loss of data

This warning is ignorable; the Int64 that is being converted
to a std::streamoff was generated by converting a std::streamoff
to an Int64 in the first place.  No data are lost here.

> d:\openexr\ilmimf\imftimecode.cpp(236) : warning
> C4800: 'unsigned int' : forcing value to bool 'true'
> or 'false' (performance warning)

The code is fine; the conversion from unsigned int to
bool is intentional and indicated by an explicit cast.
I am not sure what the compiler is trying to tell us here.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]