Fix couple of trivial warnings reported by MSVC
authorPyry Haulos <phaulos@google.com>
Tue, 3 Feb 2015 18:09:28 +0000 (10:09 -0800)
committerPyry Haulos <phaulos@google.com>
Tue, 3 Feb 2015 18:40:25 +0000 (10:40 -0800)
Change-Id: I971ead9d6280aa16b7dc4c8970c7ba48e3d1ba30

framework/common/tcuCompressedTexture.cpp
framework/delibs/deutil/deSocket.c
framework/delibs/deutil/deTimer.c
modules/egl/teglSwapBuffersTests.cpp
modules/gles31/functional/es31fTextureGatherTests.cpp

index 9bbf55c..961bd90 100644 (file)
@@ -2577,7 +2577,7 @@ int componentSum (const IVec3& vec)
 
 void decompress (const PixelBufferAccess& dst, CompressedTexFormat fmt, const deUint8* src, const TexDecompressionParams& params)
 {
-       const size_t                    blockSize                       = getBlockSize(fmt);
+       const int                               blockSize                       = getBlockSize(fmt);
        const IVec3                             blockPixelSize          (getBlockPixelSize(fmt));
        const IVec3                             blockCount                      (divRoundUp(dst.getWidth(),             blockPixelSize.x()),
                                                                                                 divRoundUp(dst.getHeight(),    blockPixelSize.y()),
index b75af62..fa8eced 100644 (file)
@@ -282,9 +282,9 @@ static deBool deSocketAddressToBsdAddress (const deSocketAddress* address, int b
                        return DE_FALSE;
                }
 
-               *bsdAddrLen     = result->ai_addrlen;
+               *bsdAddrLen     = (int)result->ai_addrlen;
 
-               deMemcpy(bsdAddr, result->ai_addr, result->ai_addrlen);
+               deMemcpy(bsdAddr, result->ai_addr, (int)result->ai_addrlen);
                freeaddrinfo(result);
 
                /* Add port. */
index 36f8190..bf8ceae 100644 (file)
@@ -131,7 +131,9 @@ void deTimer_disable (deTimer* timer)
                        if (success)
                        {
                                /* Wait for all callbacks to complete. */
-                               DE_VERIFY(WaitForSingleObject(waitEvent, INFINITE) == WAIT_OBJECT_0);
+                               DWORD res = WaitForSingleObject(waitEvent, INFINITE);
+                               DE_ASSERT(res == WAIT_OBJECT_0);
+                               DE_UNREF(res);
                                break;
                        }
                        else
index b798892..52243f4 100644 (file)
@@ -438,7 +438,7 @@ SwapBuffersTests::SwapBuffersTests (EglTestContext& eglTestCtx)
 {
 }
 
-static bool isWindow (const eglu::CandidateConfig& c) { return (c.surfaceType() & EGL_WINDOW_BIT); }
+static bool isWindow (const eglu::CandidateConfig& c) { return (c.surfaceType() & EGL_WINDOW_BIT) != 0; }
 
 void SwapBuffersTests::init (void)
 {
index 74e6354..dcdc1b2 100644 (file)
@@ -2126,7 +2126,7 @@ void TextureGatherTests::init (void)
                                        TestCaseGroup* const            formatGroup             = new TestCaseGroup(m_context, formats[formatNdx].name, "");
                                        textureTypeGroup->addChild(formatGroup);
 
-                                       for (int noCornersI = 0; noCornersI <= (textureType == TEXTURETYPE_CUBE)?1:0; noCornersI++)
+                                       for (int noCornersI = 0; noCornersI <= ((textureType == TEXTURETYPE_CUBE)?1:0); noCornersI++)
                                        {
                                                const bool                              noCorners               = noCornersI!= 0;
                                                TestCaseGroup* const    cornersGroup    = noCorners