From 3acbe8145c60f4d1e7a180b4602a94269a489df5 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 27 Apr 2023 12:36:59 +0800 Subject: Fix most of the disabled warnings on gcc/clang (#2839) --- source/compiler-core/slang-artifact-handler-impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/compiler-core/slang-artifact-handler-impl.cpp') diff --git a/source/compiler-core/slang-artifact-handler-impl.cpp b/source/compiler-core/slang-artifact-handler-impl.cpp index 5d2a74036..6fc96dc44 100644 --- a/source/compiler-core/slang-artifact-handler-impl.cpp +++ b/source/compiler-core/slang-artifact-handler-impl.cpp @@ -29,8 +29,9 @@ namespace Slang { SlangResult DefaultArtifactHandler::queryInterface(SlangUUID const& uuid, void** outObject) { - if (auto ptr = getInterface(uuid)) + if ([[maybe_unused]] auto ptr = getInterface(uuid)) { + SLANG_ASSERT(ptr == this); addRef(); *outObject = static_cast(this); return SLANG_OK; -- cgit v1.2.3