From 8b1daa68a5ff1398cdf130aacad32d2e5646d1eb Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Wed, 5 Oct 2022 04:54:49 +0800 Subject: Squash some warnings from gcc 12.2 (#2428) * Use premake's linkgroups rather than specifying the flags ourselves Fixes linker warning about unterminated --start-group * C++ only warnings only when compiling C++ * compile miniz and l4z as C, not C++ * Use enum over 0 literal Silences enum-literal-compare warning Co-authored-by: jsmall-nvidia --- source/slang/slang-reflection-api.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/slang/slang-reflection-api.cpp b/source/slang/slang-reflection-api.cpp index eb2b9aff9..ca64cbed1 100644 --- a/source/slang/slang-reflection-api.cpp +++ b/source/slang/slang-reflection-api.cpp @@ -1243,7 +1243,9 @@ namespace Slang auto shape = resourceType->getBaseShape(); auto access = resourceType->getAccess(); - auto mutableFlag = access != SLANG_RESOURCE_ACCESS_READ ? SLANG_BINDING_TYPE_MUTABLE_FLAG : 0; + auto mutableFlag = access != SLANG_RESOURCE_ACCESS_READ + ? SLANG_BINDING_TYPE_MUTABLE_FLAG + : SLANG_BINDING_TYPE_UNKNOWN; switch(SlangResourceShape(shape )) { -- cgit v1.2.3