From c45058764e48ef8d325351b89457d14274cc3bdf Mon Sep 17 00:00:00 2001 From: Anatoliy Tomilov Date: Fri, 15 Jan 2021 07:28:26 +0500 Subject: [PATCH] [linux][warnings] Fix -Werror=unused-but-set-variable on GCC 10.2, Linux Variable definition moved into a block where it is conditionally used. --- VulkanHppGenerator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 77279f1..d0c5cfd 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -4091,11 +4091,10 @@ std::string { assert( commandData.returnType == "VkResult" ); - auto firstVectorParamIt = vectorParamIndices.begin(); - assert( commandData.params[0].type.type == commandData.handle ); #if !defined( NDEBUG ) + auto firstVectorParamIt = vectorParamIndices.begin(); auto secondVectorParamIt = std::next( firstVectorParamIt ); assert( firstVectorParamIt->second == secondVectorParamIt->second ); #endif