Skip to content

Commit f2f02c5

Browse files
authored
Resolve some default error warnings (#7191) (#7196)
DxilContainerValidation.cpp has some int / bool comparisons that cause default error warnings in some of the private builds. This needs to be addressed. This PR changes the comparisons by converting the numerical expressions into the appropriate boolean, then comparing the booleans.
1 parent b471183 commit f2f02c5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/DxilValidation/DxilContainerValidation.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ void PSVContentVerifier::VerifySignatureElement(
337337

338338
PSVSignatureElement PSVSE(StrTab, IndexTab, PSVSE0);
339339
if (SE.IsArbitrary())
340-
Mismatch |= strcmp(PSVSE.GetSemanticName(), SE.GetName());
340+
Mismatch |= strcmp(PSVSE.GetSemanticName(), SE.GetName()) != 0;
341341
else
342342
Mismatch |= PSVSE0->SemanticKind != static_cast<uint8_t>(SE.GetKind());
343343

@@ -494,7 +494,8 @@ void PSVContentVerifier::Verify(unsigned ValMajor, unsigned ValMinor,
494494
std::to_string(ShaderStage));
495495
return;
496496
}
497-
if (PSV1->UsesViewID != DM.m_ShaderFlags.GetViewID())
497+
bool ViewIDUsed = PSV1->UsesViewID != 0;
498+
if (ViewIDUsed != DM.m_ShaderFlags.GetViewID())
498499
EmitMismatchError("UsesViewID", std::to_string(PSV1->UsesViewID),
499500
std::to_string(DM.m_ShaderFlags.GetViewID()));
500501

0 commit comments

Comments
 (0)