Cleanup runtime unused variable settings (#14519)
Caught by GCC warnings
diff --git a/runtime/bindings/python/vm.h b/runtime/bindings/python/vm.h
index ef5d8ea..80b8607 100644
--- a/runtime/bindings/python/vm.h
+++ b/runtime/bindings/python/vm.h
@@ -225,7 +225,6 @@
RetainRefFunctor retain_ref, DerefFunctor deref,
IsaFunctor isa) {
using WrapperType = typename PyClass::Type;
- using RawPtrType = typename WrapperType::RawPtrType;
auto ref_lambda = [=](WrapperType& self) {
return VmRef::Steal(retain_ref(self.raw_ptr()));
};
diff --git a/runtime/src/iree/base/internal/cpu.c b/runtime/src/iree/base/internal/cpu.c
index 08d99f2..5cd4d54 100644
--- a/runtime/src/iree/base/internal/cpu.c
+++ b/runtime/src/iree/base/internal/cpu.c
@@ -196,7 +196,7 @@
regs.ecx = regs_array[2];
regs.edx = regs_array[3];
#else
-#error What's the __cpuidex built-in for this compiler?
+#error What is the __cpuidex built-in for this compiler?
#endif
return regs;
}
diff --git a/runtime/src/iree/task/scope_test.cc b/runtime/src/iree/task/scope_test.cc
index 72befd4..85c0840 100644
--- a/runtime/src/iree/task/scope_test.cc
+++ b/runtime/src/iree/task/scope_test.cc
@@ -64,7 +64,7 @@
// Enter failure state.
iree_task_t failed_task = {0};
failed_task.scope = &scope;
- iree_task_scope_fail(&scope,
+ iree_task_scope_fail(failed_task.scope,
iree_make_status(IREE_STATUS_DATA_LOSS, "whoops!"));
iree_status_t consumed_status = iree_task_scope_consume_status(&scope);
EXPECT_TRUE(iree_status_is_data_loss(consumed_status));
@@ -89,7 +89,7 @@
// Enter initial failure state.
iree_task_t failed_task_a = {0};
failed_task_a.scope = &scope;
- iree_task_scope_fail(&scope,
+ iree_task_scope_fail(failed_task_a.scope,
iree_make_status(IREE_STATUS_DATA_LOSS, "whoops 1"));
iree_status_t consumed_status_a = iree_task_scope_consume_status(&scope);
EXPECT_TRUE(iree_status_is_data_loss(consumed_status_a));
@@ -102,7 +102,8 @@
iree_task_t failed_task_b = {0};
failed_task_b.scope = &scope;
iree_task_scope_fail(
- &scope, iree_make_status(IREE_STATUS_FAILED_PRECONDITION, "whoops 2"));
+ failed_task_b.scope,
+ iree_make_status(IREE_STATUS_FAILED_PRECONDITION, "whoops 2"));
iree_status_t consumed_status_b = iree_task_scope_consume_status(&scope);
EXPECT_TRUE(iree_status_is_data_loss(consumed_status_b));
iree_status_ignore(consumed_status_b);
diff --git a/tools/iree-run-mlir-main.cc b/tools/iree-run-mlir-main.cc
index fb57544..00c62fb 100644
--- a/tools/iree-run-mlir-main.cc
+++ b/tools/iree-run-mlir-main.cc
@@ -225,8 +225,9 @@
const char* compiler_argv[1] = {
target_backends_flag.c_str(),
};
- if (auto error = ireeCompilerSessionSetFlags(
- session, IREE_ARRAYSIZE(compiler_argv), compiler_argv)) {
+ auto error = ireeCompilerSessionSetFlags(
+ session, IREE_ARRAYSIZE(compiler_argv), compiler_argv);
+ if (error) {
return iree_make_status(
IREE_STATUS_INVALID_ARGUMENT,
"unable to set inferred target backend flag to `%.*s`",