[mlir] fix compiler warnings

-Wsign-compare and -Wunsued-value in the recently introduced code.
This commit is contained in:
Alex Zinenko 2022-04-14 15:25:42 +02:00
parent 65fcd31ef1
commit e5a5e00825
2 changed files with 2 additions and 2 deletions

View File

@ -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)...};

View File

@ -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;
}