Fix compile warnings

This commit is contained in:
Lachlan Sneff 2018-12-26 20:47:34 -05:00
parent a7618346e6
commit b9976f10b7
3 changed files with 3 additions and 4 deletions

View File

@ -66,7 +66,7 @@ impl LocalBacking {
);
let offset = init.offset;
let mem: &mut LinearMemory = &mut memories[init.memory_index.index()];
let end_of_init = offset + init.data.len();
// let end_of_init = offset + init.data.len();
// if end_of_init > mem.current_size() {
// let grow_pages = (end_of_init / LinearMemory::PAGE_SIZE as usize) + 1;
// mem.grow(grow_pages as u32)
@ -95,7 +95,7 @@ impl LocalBacking {
}
// TODO: Actually finish this
fn finalize_tables(module: &Module, tables: &mut [TableBacking]) -> Box<[vm::LocalTable]> {
fn finalize_tables(_module: &Module, tables: &mut [TableBacking]) -> Box<[vm::LocalTable]> {
tables
.iter_mut()
.map(|table| table.into_vm_table())

View File

@ -5,7 +5,7 @@ use crate::runtime::{
module::{Export, Module},
sig_registry::SigRegistry,
table::TableBacking,
types::{FuncIndex, FuncSig, Memory, Table, Type, Val},
types::{FuncSig, Memory, Table, Type, Val},
vm,
};
use hashbrown::HashMap;

View File

@ -145,7 +145,6 @@ impl LinearMemory {
return None;
}
let prev_bytes = (prev_pages * Self::PAGE_SIZE) as usize;
let new_bytes = (new_pages * Self::PAGE_SIZE) as usize;
if new_bytes > self.mmap.len() - self.offset_guard_size {