From 00e2bf1cd3e30cd6560222f620b7f66fa55c1549 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Wed, 16 Aug 2023 13:27:00 +0800 Subject: squash warnings (#3113) * Remove unused variables * Silence gcc out of bounds warnings * Squash strict-aliasing warnings It is still a naughty thing to be casting to T like this though * Correct equality check when val is nullptr --------- Co-authored-by: Yong He --- source/slang/slang-check-decl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-check-decl.cpp') diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index 8c9ca2936..cb3db9e39 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -1335,7 +1335,7 @@ namespace Slang auto newDeclRef = createDefaultSubstitutionsIfNeeded(m_astBuilder, this, declRefType->getDeclRef()); auto newType = DeclRefType::create(m_astBuilder, newDeclRef); sharedTypeExpr->base.type = newType; - if (auto typetype = as(typeExp.exp->type)) + if (as(typeExp.exp->type)) typeExp.exp->type = m_astBuilder->getTypeType(newType); } } -- cgit v1.2.3