Fix warnings reported by VS 2015
authorPyry Haulos <phaulos@google.com>
Mon, 14 Nov 2016 17:05:16 +0000 (09:05 -0800)
committerPyry Haulos <phaulos@google.com>
Mon, 14 Nov 2016 17:06:31 +0000 (09:06 -0800)
Change-Id: Ifc12df928d6d2f939d01c39a55a48bf861c51be7

external/vulkancts/framework/vulkan/vkNullDriver.cpp
external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp
external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicSemaphoreTests.cpp
external/vulkancts/modules/vulkan/texture/vktSampleVerifierUtil.cpp
framework/qphelper/qpCrashHandler.c

index 80a2047..3ee23bf 100644 (file)
@@ -789,7 +789,7 @@ VKAPI_ATTR void VKAPI_CALL getDeviceQueue (VkDevice device, deUint32 queueFamily
        DE_UNREF(queueFamilyIndex);
 
        if (pQueue)
-               *pQueue = reinterpret_cast<VkQueue>(queueIndex + 1);
+               *pQueue = reinterpret_cast<VkQueue>((deUint64)queueIndex + 1);
 }
 
 VKAPI_ATTR void VKAPI_CALL getBufferMemoryRequirements (VkDevice, VkBuffer bufferHandle, VkMemoryRequirements* requirements)
index 7ff2f9e..ecdd37d 100644 (file)
@@ -1728,7 +1728,7 @@ bool BlittingImages::checkClampedAndUnclampedResult(const tcu::ConstPixelBufferA
        if (isFloatFormat(mapTextureFormat(dstFormat)))
        {
                const bool              srcIsSRGB       = tcu::isSRGB(srcFormat);
-               const tcu::Vec4 srcMaxDiff      = getFormatThreshold(srcFormat) * tcu::Vec4(srcIsSRGB ? 2 : 1);
+               const tcu::Vec4 srcMaxDiff      = getFormatThreshold(srcFormat) * tcu::Vec4(srcIsSRGB ? 2.0f : 1.0f);
                const tcu::Vec4 dstMaxDiff      = getFormatThreshold(dstFormat);
                const tcu::Vec4 threshold       = tcu::max(srcMaxDiff, dstMaxDiff);
 
index a28c11d..5dfe6f9 100644 (file)
@@ -132,8 +132,8 @@ tcu::TestStatus basicMultiQueueCase (Context& context)
        VkDeviceQueueCreateInfo                                 queueInfos[COUNT];
        Queues                                                                  queues[COUNT]                           =
                                                                                                                                                {
-                                                                                                                                                       {DE_NULL, NO_MATCH_FOUND},
-                                                                                                                                                       {DE_NULL, NO_MATCH_FOUND}
+                                                                                                                                                       {DE_NULL, (deUint32)NO_MATCH_FOUND},
+                                                                                                                                                       {DE_NULL, (deUint32)NO_MATCH_FOUND}
                                                                                                                                                };
        const VkCommandBufferBeginInfo                  info                                            =
                                                                                                                                                {
index dfd4c5a..c7ad274 100644 (file)
@@ -608,7 +608,7 @@ namespace
 
 deInt64 signExtend (deUint64 src, int bits)
 {
-       const deUint64 signBit = 1u << (bits-1);
+       const deUint64 signBit = 1ull << (bits-1);
 
        src |= ~((src & signBit) - 1);
 
index 792ae37..409397f 100644 (file)
@@ -33,7 +33,7 @@
 #include <stdarg.h>
 #include <stdlib.h>
 
-#if DE_OS == DE_OS_UNIX
+#if (DE_OS == DE_OS_UNIX)
 #      include <unistd.h>
 #      include <execinfo.h>
 #      include <errno.h>
@@ -137,7 +137,12 @@ static void defaultCrashHandler (qpCrashHandler* crashHandler, void* userPtr)
 
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
+
+/* DbgHelp.h generates C4091 */
+#pragma warning (push)
+#pragma warning (disable: 4091)
 #include <DbgHelp.h>
+#pragma warning (pop)
 
 struct qpCrashHandler_s
 {