Explorar o código

Fix a couple warnings in code (#2746)

1. A warning about unused "group" variable
2. A CMake warning about unmatched if and endif
Minmin Gong %!s(int64=5) %!d(string=hai) anos
pai
achega
7dc56492a0
Modificáronse 2 ficheiros con 2 adicións e 4 borrados
  1. 1 3
      lib/HLSL/HLOperationLower.cpp
  2. 1 1
      projects/CMakeLists.txt

+ 1 - 3
lib/HLSL/HLOperationLower.cpp

@@ -108,9 +108,7 @@ public:
 
   void MarkHasCounter(Value *handle, Type *i8Ty) {
     CallInst *CIHandle = cast<CallInst>(handle);
-    hlsl::HLOpcodeGroup group =
-        hlsl::GetHLOpcodeGroup(CIHandle->getCalledFunction());
-    DXASSERT(group == HLOpcodeGroup::HLAnnotateHandle, "else invalid handle");
+    DXASSERT(hlsl::GetHLOpcodeGroup(CIHandle->getCalledFunction()) == HLOpcodeGroup::HLAnnotateHandle, "else invalid handle");
     // Mark has counter for the input handle.
     Value *counterHandle =
         CIHandle->getArgOperand(HLOperandIndex::kAnnotateHandleHandleOpIdx);

+ 1 - 1
projects/CMakeLists.txt

@@ -1,3 +1,3 @@
 if(WIN32 AND HLSL_BUILD_DXILCONV)
   add_subdirectory(dxilconv)
-endif (WIN32)
+endif (WIN32 AND HLSL_BUILD_DXILCONV)