Skip to content

Commit

Permalink
Fix compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Jan 7, 2025
1 parent 1192095 commit 7e638c4
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/wast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,11 @@ fn run_wast(test: &WastTest, config: WastConfig) -> anyhow::Result<()> {
// Don't use 4gb address space reservations when not hogging memory, and
// also don't reserve lots of memory after dynamic memories for growth
// (makes growth slower).
#[cfg(feature = "signals-based-traps")]
{
cfg.memory_reservation(2 * u64::from(wasmtime_environ::Memory::DEFAULT_PAGE_SIZE));
cfg.memory_reservation_for_growth(0);
cfg.memory_reservation(2 * u64::from(wasmtime_environ::Memory::DEFAULT_PAGE_SIZE));
cfg.memory_reservation_for_growth(0);

let small_guard = 64 * 1024;
cfg.memory_guard_size(small_guard);
}
let small_guard = 64 * 1024;
cfg.memory_guard_size(small_guard);
}

let _pooling_lock = if config.pooling {
Expand All @@ -177,10 +174,6 @@ fn run_wast(test: &WastTest, config: WastConfig) -> anyhow::Result<()> {
return Ok(());
}

if !cfg!(feature = "signals-based-traps") {
return Ok(());
}

// Reduce the virtual memory required to run multi-memory-based tests.
//
// The configuration parameters below require that a bare minimum
Expand All @@ -192,7 +185,6 @@ fn run_wast(test: &WastTest, config: WastConfig) -> anyhow::Result<()> {
// force the usage of static memories without guards to reduce the VM
// impact.
let max_memory_size = limits::MEMORY_SIZE;
#[cfg(feature = "signals-based-traps")]
if multi_memory {
cfg.memory_reservation(max_memory_size as u64);
cfg.memory_reservation_for_growth(0);
Expand Down

0 comments on commit 7e638c4

Please sign in to comment.