10 Dec 04:16
RE: ilmbase new release
John Burnett <JBurnett <at> blizzard.com>
2009-12-10 03:16:26 GMT
2009-12-10 03:16:26 GMT
Great to hear! We are using 1.01 internally here, so the attached diff applies to that. They're all silly little things like doing explicit casts and using ((expr) != FALSE) to coerce expressions into bools. Thanks! John -----Original Message----- From: Piotr Stanczyk [mailto:pstanczyk <at> ilm.com] Sent: Wednesday, December 09, 2009 1:20 PM To: John Burnett Cc: openexr-devel <at> nongnu.org Subject: Re: [Openexr-devel] ilmbase new release Hi John, That is indeed the plan, I'd like to have a firmer plan for the release at the start of next year.... In the meantime, would you be so kind as to send me the changes and I will fold them in to the CVS tree and test out. Many thanks in advance Piotr John Burnett wrote: > > Hello, > > Is there going to be a push for an updated ilmbase release? > > I made a few changes to fix build some warnings (silly things like int > vs size_t), and I'm curious if I should try to push those changes up > to the official project? If so, what are the guidelines for contributing? > > Thanks, > > John > > ------------------------------------------------------------------------ > > _______________________________________________ > Openexr-devel mailing list > Openexr-devel <at> nongnu.org > http://lists.nongnu.org/mailman/listinfo/openexr-devel >
Index: K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/Imath/ImathVec.cpp
===================================================================
---
K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/Imath/ImathVec.cpp (revision 40239)
+++
K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/Imath/ImathVec.cpp (revision 40240)
@@ -107,7 +107,7 @@
short
Vec2<short>::length () const
{
- float lenF = Math<float>::sqrt (dot (*this));
+ float lenF = Math<float>::sqrt ((float)dot (*this));
short lenS = (short) (lenF + 0.5f);
return lenS;
}
@@ -176,7 +176,7 @@
int
Vec2<int>::length () const
{
- float lenF = Math<float>::sqrt (dot (*this));
+ float lenF = Math<float>::sqrt ((float)dot (*this));
int lenI = (int) (lenF + 0.5f);
return lenI;
}
@@ -314,7 +314,7 @@
int
Vec3<int>::length () const
{
- float lenF = Math<float>::sqrt (dot (*this));
+ float lenF = Math<float>::sqrt ((float)dot (*this));
int lenI = (int) (lenF + 0.5f);
return lenI;
}
Index: K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/Imath/ImathRandom.cpp
===================================================================
---
K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/Imath/ImathRandom.cpp (revision 40239)
+++
K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/Imath/ImathRandom.cpp (revision 40240)
@@ -91,9 +91,9 @@
// We assume that sizeof (unsigned short) == 2.
//
- state[2] = x >> 32;
- state[1] = x >> 16;
- state[0] = x;
+ state[2] = unsigned short(x >> 32);
+ state[1] = unsigned short(x >> 16);
+ state[0] = unsigned short(x);
}
} // namespace
@@ -163,7 +163,7 @@
srand48 (long int seed)
{
staticState[2] = seed >> 16;
- staticState[1] = seed;
+ staticState[1] = unsigned short(seed);
staticState[0] = 0x330e;
}
Index: K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/IlmThread/IlmThreadSemaphoreWin32.cpp
===================================================================
---
K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/IlmThread/IlmThreadSemaphoreWin32.cpp (revision 40239)
+++
K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/IlmThread/IlmThreadSemaphoreWin32.cpp (revision 40240)
@@ -95,7 +95,7 @@
Semaphore::~Semaphore()
{
- bool ok = ::CloseHandle (_semaphore);
+ bool ok = ::CloseHandle (_semaphore) != FALSE;
assert (ok);
}
Index: K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/IlmThread/IlmThreadPool.cpp
===================================================================
---
K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/IlmThread/IlmThreadPool.cpp (revision 40239)
+++
K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/IlmThread/IlmThreadPool.cpp (revision 40240)
@@ -247,7 +247,7 @@
// an error like: "pure virtual method called"
//
- for (int i = 0; i < numThreads; i++)
+ for (size_t i = 0; i < numThreads; i++)
{
taskSemaphore.post();
threadSemaphore.wait();
@@ -364,19 +364,19 @@
Lock lock (_data->threadMutex);
- if (count > _data->numThreads)
+ if ((size_t)count > _data->numThreads)
{
//
// Add more threads
//
- while (_data->numThreads < count)
+ while (_data->numThreads < (size_t)count)
{
_data->threads.push_back (new WorkerThread (_data));
_data->numThreads++;
}
}
- else if (count < _data->numThreads)
+ else if ((size_t)count < _data->numThreads)
{
//
// Wait until all existing threads are finished processing,
@@ -389,7 +389,7 @@
// Add in new threads
//
- while (_data->numThreads < count)
+ while (_data->numThreads < (size_t)count)
{
_data->threads.push_back (new WorkerThread (_data));
_data->numThreads++;
Index: K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/IlmThread/IlmThreadWin32.cpp
===================================================================
---
K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/IlmThread/IlmThreadWin32.cpp (revision 40239)
+++
K:/dev/trunk/buildsystem/trunk/ThirdParty/Source/Libraries/ilmbase/Source/IlmThread/IlmThreadWin32.cpp (revision 40240)
@@ -76,7 +76,7 @@
{
DWORD status = ::WaitForSingleObject (_thread, INFINITE);
assert (status == WAIT_OBJECT_0);
- bool ok = ::CloseHandle (_thread);
+ bool ok = ::CloseHandle (_thread) != FALSE;
assert (ok);
}
_______________________________________________ Openexr-devel mailing list Openexr-devel <at> nongnu.org http://lists.nongnu.org/mailman/listinfo/openexr-devel
RSS Feed