Fix build warnings in wasmer and kwasmd

This commit is contained in:
Brandon Fish 2019-07-05 00:04:58 -05:00
parent d26cee8bba
commit 817bf93f1a
2 changed files with 5 additions and 13 deletions

View File

@ -1,24 +1,16 @@
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
extern crate byteorder;
extern crate structopt;
use std::thread;
use structopt::StructOpt;
use wasmer::*;
use wasmer_runtime::Value;
use wasmer_runtime_core::{
self,
backend::{CompilerConfig, MemoryBoundCheckMode},
loader::Instance as LoadedInstance,
};
#[cfg(feature = "loader:kernel")]
use wasmer_singlepass_backend::SinglePassCompiler;
use std::io::prelude::*;
#[cfg(feature = "loader:kernel")]
use std::os::unix::net::{UnixListener, UnixStream};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
#[derive(Debug, StructOpt)]
#[structopt(name = "kwasmd", about = "Kernel-mode WebAssembly service.")]
enum CLIOptions {

View File

@ -486,7 +486,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
.map_err(|e| format!("{:?}", e))?;
} else {
if cfg!(feature = "wasi") && wasmer_wasi::is_wasi_module(&module) {
let mut import_object = wasmer_wasi::generate_import_object(
let import_object = wasmer_wasi::generate_import_object(
if let Some(cn) = &options.command_name {
[cn.clone()]
} else {
@ -505,7 +505,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
mapped_dirs,
);
let mut instance = module
let instance = module
.instantiate(&import_object)
.map_err(|e| format!("Can't instantiate module: {:?}", e))?;