Skip to content

Commit

Permalink
Cleanup runtime unused variable settings (iree-org#14519)
Browse files Browse the repository at this point in the history
Caught by GCC warnings
  • Loading branch information
hcindyl authored Jul 30, 2023
1 parent 0b49316 commit cf5d348
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion runtime/bindings/python/vm.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ class VmRef {
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()));
};
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/iree/base/internal/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static inline iree_cpuid_regs_t iree_cpuid_raw(uint32_t eax, uint32_t ecx) {
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;
}
Expand Down
7 changes: 4 additions & 3 deletions runtime/src/iree/task/scope_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ TEST(ScopeTest, FailEmpty) {
// 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));
Expand All @@ -89,7 +89,7 @@ TEST(ScopeTest, FailAgain) {
// 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));
Expand All @@ -102,7 +102,8 @@ TEST(ScopeTest, FailAgain) {
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);
Expand Down
5 changes: 3 additions & 2 deletions tools/iree-run-mlir-main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ Status ConfigureTargetBackends(iree_compiler_session_t* session,
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`",
Expand Down

0 comments on commit cf5d348

Please sign in to comment.