From 9575e33186c74a68831c469f7271edf386ea43a5 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Wed, 21 Jun 2023 15:15:23 +0100 Subject: [PATCH] Fix unused parameter warning in Release builds The `function` parameter is only used by an assert currently, so mark it as "maybe unused". Alternatively the parameter could be removed, but avoid such API churn for now. --- SPIRV/SpvBuilder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 8d0b677b..df5f234b 100644 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -2109,7 +2109,8 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const return function; } -Id Builder::makeDebugFunction(Function* function, Id nameId, Id funcTypeId) { +Id Builder::makeDebugFunction([[maybe_unused]] Function* function, Id nameId, Id funcTypeId) +{ assert(function != nullptr); assert(nameId != 0); assert(funcTypeId != 0);