forked from OSchip/llvm-project
[mlir] fix compiler warnings
-Wsign-compare and -Wunsued-value in the recently introduced code.
This commit is contained in:
parent
65fcd31ef1
commit
e5a5e00825
|
@ -69,7 +69,7 @@ protected:
|
|||
transformDialect->addOperations<OpTys...>();
|
||||
|
||||
#ifndef NDEBUG
|
||||
std::initializer_list<int>{
|
||||
(void)std::initializer_list<int>{
|
||||
(detail::checkImplementsTransformInterface<OpTys>(
|
||||
transformDialect->getContext()),
|
||||
0)...};
|
||||
|
|
|
@ -72,7 +72,7 @@ LogicalResult mlir::test::TestConsumeOperandIfMatchesParamOrFail::apply(
|
|||
ArrayRef<Operation *> payload = state.getPayloadOps(getOperand());
|
||||
assert(payload.size() == 1 && "expected a single target op");
|
||||
auto value = reinterpret_cast<intptr_t>(payload[0]);
|
||||
if (value != parameter()) {
|
||||
if (static_cast<uint64_t>(value) != parameter()) {
|
||||
return emitOpError() << "expected the operand to be associated with "
|
||||
<< parameter() << " got " << value;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue