Skip to content

Commit

Permalink
Silence unused variable warning in release mode. (bytecodealliance#11)
Browse files Browse the repository at this point in the history
This patch fixes an unused variable warning triggered in
`continuation.rs` when compiling in release mode.

```
warning: unused variable: `running_contobj`
   --> crates/runtime/src/continuation.rs:374:13
    |
374 |         let running_contobj = instance.typed_continuations_store();
    |             ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_running_contobj`
    |
    = note: `#[warn(unused_variables)]` on by default
```
  • Loading branch information
dhil committed Sep 26, 2023
1 parent bbe66a8 commit 83bb453
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/runtime/src/continuation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,11 @@ pub fn resume(
let fiber = unsafe { (*contobj).fiber };

if ENABLE_DEBUG_PRINTING {
let running_contobj = instance.typed_continuations_store();
let _running_contobj = instance.typed_continuations_store();
debug_println!(
"Resuming contobj @ {:p}, previously running contobj is {:p}",
contobj,
running_contobj
_running_contobj
);
}

Expand Down

0 comments on commit 83bb453

Please sign in to comment.