From 5f78b1323b6ef28d8b9cdce6fefcbbb61a0477a9 Mon Sep 17 00:00:00 2001 From: Pyry Haulos Date: Tue, 3 Feb 2015 10:09:28 -0800 Subject: [PATCH] Fix couple of trivial warnings reported by MSVC Change-Id: I971ead9d6280aa16b7dc4c8970c7ba48e3d1ba30 --- framework/common/tcuCompressedTexture.cpp | 2 +- framework/delibs/deutil/deSocket.c | 4 ++-- framework/delibs/deutil/deTimer.c | 4 +++- modules/egl/teglSwapBuffersTests.cpp | 2 +- modules/gles31/functional/es31fTextureGatherTests.cpp | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/framework/common/tcuCompressedTexture.cpp b/framework/common/tcuCompressedTexture.cpp index 9bbf55c..961bd90 100644 --- a/framework/common/tcuCompressedTexture.cpp +++ b/framework/common/tcuCompressedTexture.cpp @@ -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()), diff --git a/framework/delibs/deutil/deSocket.c b/framework/delibs/deutil/deSocket.c index b75af62..fa8eced 100644 --- a/framework/delibs/deutil/deSocket.c +++ b/framework/delibs/deutil/deSocket.c @@ -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. */ diff --git a/framework/delibs/deutil/deTimer.c b/framework/delibs/deutil/deTimer.c index 36f8190..bf8ceae 100644 --- a/framework/delibs/deutil/deTimer.c +++ b/framework/delibs/deutil/deTimer.c @@ -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 diff --git a/modules/egl/teglSwapBuffersTests.cpp b/modules/egl/teglSwapBuffersTests.cpp index b798892..52243f4 100644 --- a/modules/egl/teglSwapBuffersTests.cpp +++ b/modules/egl/teglSwapBuffersTests.cpp @@ -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) { diff --git a/modules/gles31/functional/es31fTextureGatherTests.cpp b/modules/gles31/functional/es31fTextureGatherTests.cpp index 74e6354..dcdc1b2 100644 --- a/modules/gles31/functional/es31fTextureGatherTests.cpp +++ b/modules/gles31/functional/es31fTextureGatherTests.cpp @@ -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 -- 2.7.4