From a7dd782d7895e1f277573fb9923be653ab813941 Mon Sep 17 00:00:00 2001 From: Yong He Date: Sat, 4 Nov 2017 16:23:21 -0400 Subject: fix linux build --- source/slang/bytecode.cpp | 9 ++++++--- source/slang/check.cpp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/slang/bytecode.cpp b/source/slang/bytecode.cpp index 2130972e2..e3cd9e74e 100644 --- a/source/slang/bytecode.cpp +++ b/source/slang/bytecode.cpp @@ -271,9 +271,12 @@ BCConst getGlobalValue( } SLANG_UNEXPECTED("no ID for inst"); - UNREACHABLE(bcConst.flavor = (BCConstFlavor) -1); - UNREACHABLE(bcConst.id = -9999); - UNREACHABLE_RETURN(bcConst); + { + UNREACHABLE(BCConst bcConst); + UNREACHABLE(bcConst.flavor = (BCConstFlavor)-1); + UNREACHABLE(bcConst.id = -9999); + UNREACHABLE_RETURN(bcConst); + } } Int getLocalID( diff --git a/source/slang/check.cpp b/source/slang/check.cpp index cbdf68bf2..65b2295cc 100644 --- a/source/slang/check.cpp +++ b/source/slang/check.cpp @@ -5993,7 +5993,7 @@ namespace Slang RefPtr visitStaticMemberExpr(StaticMemberExpr* /*expr*/) { SLANG_UNEXPECTED("should not occur in unchecked AST"); - UNREACHABLE_RETURN(expr); + UNREACHABLE_RETURN(nullptr); } RefPtr lookupResultFailure( -- cgit v1.2.3