From 664e0da8dff1d04860cc46ce8139cbd47e15c552 Mon Sep 17 00:00:00 2001 From: Yong He Date: Sat, 4 Nov 2017 15:37:40 -0400 Subject: fix all unreachable code warnings --- source/slang/bytecode.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/slang/bytecode.cpp') diff --git a/source/slang/bytecode.cpp b/source/slang/bytecode.cpp index f1b23849d..ed969b72d 100644 --- a/source/slang/bytecode.cpp +++ b/source/slang/bytecode.cpp @@ -271,9 +271,9 @@ BCConst getGlobalValue( } SLANG_UNEXPECTED("no ID for inst"); - bcConst.flavor = (BCConstFlavor) -1; - bcConst.id = -9999; - return bcConst; + UNREACHABLE(bcConst.flavor = (BCConstFlavor) -1); + UNREACHABLE(bcConst.id = -9999); + UNREACHABLE_RETURN(bcConst); } Int getLocalID( @@ -577,7 +577,7 @@ BytecodeGenerationPtr emitBCTypeImpl( SLANG_UNEXPECTED("unimplemented"); - return BytecodeGenerationPtr(); + UNREACHABLE_RETURN(BytecodeGenerationPtr()); } BytecodeGenerationPtr emitBCType( -- cgit v1.2.3