mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Merge #430
430: Add some initial deny for unused_imports and unused_variables r=bjfish a=bjfish Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
This commit is contained in:
commit
8d2a08a1be
@ -1,3 +1,5 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
|
|
||||||
mod cache;
|
mod cache;
|
||||||
mod func_env;
|
mod func_env;
|
||||||
mod libcalls;
|
mod libcalls;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate wasmer_runtime_core;
|
extern crate wasmer_runtime_core;
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
use crate::varargs::VarArgs;
|
use crate::varargs::VarArgs;
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
use libc::size_t;
|
||||||
/// NOTE: TODO: These syscalls only support wasm_32 for now because they assume offsets are u32
|
/// NOTE: TODO: These syscalls only support wasm_32 for now because they assume offsets are u32
|
||||||
/// Syscall list: https://www.cs.utexas.edu/~bismith/test/syscalls/syscalls32.html
|
/// Syscall list: https://www.cs.utexas.edu/~bismith/test/syscalls/syscalls32.html
|
||||||
use libc::{
|
use libc::{
|
||||||
@ -53,7 +55,6 @@ use libc::{
|
|||||||
sendto,
|
sendto,
|
||||||
setpgid,
|
setpgid,
|
||||||
setsockopt,
|
setsockopt,
|
||||||
size_t,
|
|
||||||
sockaddr,
|
sockaddr,
|
||||||
socket,
|
socket,
|
||||||
socklen_t,
|
socklen_t,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
#![cfg_attr(nightly, feature(unwind_attributes))]
|
#![cfg_attr(nightly, feature(unwind_attributes))]
|
||||||
|
|
||||||
mod backend;
|
mod backend;
|
||||||
|
@ -34,7 +34,7 @@ pub unsafe fn visit_fde(addr: *mut u8, size: usize, visitor: extern "C" fn(*mut
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "macos"))]
|
||||||
pub unsafe fn visit_fde(addr: *mut u8, size: usize, visitor: extern "C" fn(*mut u8)) {
|
pub unsafe fn visit_fde(addr: *mut u8, _size: usize, visitor: extern "C" fn(*mut u8)) {
|
||||||
visitor(addr);
|
visitor(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ impl FunctionMiddleware for CallTrace {
|
|||||||
fn feed_event<'a, 'b: 'a>(
|
fn feed_event<'a, 'b: 'a>(
|
||||||
&mut self,
|
&mut self,
|
||||||
op: Event<'a, 'b>,
|
op: Event<'a, 'b>,
|
||||||
module_info: &ModuleInfo,
|
_module_info: &ModuleInfo,
|
||||||
sink: &mut EventSink<'a, 'b>,
|
sink: &mut EventSink<'a, 'b>,
|
||||||
) -> Result<(), Self::Error> {
|
) -> Result<(), Self::Error> {
|
||||||
match op {
|
match op {
|
||||||
|
@ -1 +1,3 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
|
|
||||||
pub mod call_trace;
|
pub mod call_trace;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
|
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate failure;
|
extern crate failure;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
|
|
||||||
extern crate wasmer_runtime;
|
extern crate wasmer_runtime;
|
||||||
extern crate wasmer_runtime_core;
|
extern crate wasmer_runtime_core;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
backend::RunnableModule,
|
backend::RunnableModule,
|
||||||
backend::{sys::Memory, Backend, CacheGen, Compiler, CompilerConfig, Token},
|
backend::{Backend, CacheGen, Compiler, CompilerConfig, Token},
|
||||||
cache::{Artifact, Error as CacheError},
|
cache::{Artifact, Error as CacheError},
|
||||||
error::{CompileError, CompileResult},
|
error::{CompileError, CompileResult},
|
||||||
module::{ModuleInfo, ModuleInner},
|
module::{ModuleInfo, ModuleInner},
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
#![cfg_attr(nightly, feature(unwind_attributes))]
|
#![cfg_attr(nightly, feature(unwind_attributes))]
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
|
|
||||||
//! Wasmer-runtime is a library that makes embedding WebAssembly
|
//! Wasmer-runtime is a library that makes embedding WebAssembly
|
||||||
//! in your application easy, efficient, and safe.
|
//! in your application easy, efficient, and safe.
|
||||||
//!
|
//!
|
||||||
|
@ -478,7 +478,7 @@ impl ModuleCodeGenerator<X64FunctionCode, X64ExecutionContext, CodegenError>
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn from_cache(artifact: Artifact, _: Token) -> Result<ModuleInner, CacheError> {
|
unsafe fn from_cache(_artifact: Artifact, _: Token) -> Result<ModuleInner, CacheError> {
|
||||||
Err(CacheError::Unknown(
|
Err(CacheError::Unknown(
|
||||||
"the singlepass compiler API doesn't support caching yet".to_string(),
|
"the singlepass compiler API doesn't support caching yet".to_string(),
|
||||||
))
|
))
|
||||||
@ -1409,7 +1409,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn begin_body(&mut self, module_info: &ModuleInfo) -> Result<(), CodegenError> {
|
fn begin_body(&mut self, _module_info: &ModuleInfo) -> Result<(), CodegenError> {
|
||||||
let a = self.assembler.as_mut().unwrap();
|
let a = self.assembler.as_mut().unwrap();
|
||||||
a.emit_push(Size::S64, Location::GPR(GPR::RBP));
|
a.emit_push(Size::S64, Location::GPR(GPR::RBP));
|
||||||
a.emit_mov(Size::S64, Location::GPR(GPR::RSP), Location::GPR(GPR::RBP));
|
a.emit_mov(Size::S64, Location::GPR(GPR::RSP), Location::GPR(GPR::RBP));
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
#![feature(proc_macro_hygiene)]
|
#![feature(proc_macro_hygiene)]
|
||||||
|
|
||||||
#[cfg(not(any(
|
#[cfg(not(any(
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate log;
|
extern crate log;
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
use std::ffi::c_void;
|
|
||||||
use std::ptr::NonNull;
|
use std::ptr::NonNull;
|
||||||
use wasmer_runtime_core::vm::{Ctx, Func};
|
use wasmer_runtime_core::vm::{Ctx, Func};
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
mod exception_handling;
|
mod exception_handling;
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
|
|
||||||
extern crate structopt;
|
extern crate structopt;
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![deny(unused_imports, unused_variables)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate wasmer_runtime_core;
|
extern crate wasmer_runtime_core;
|
||||||
// extern crate wasmer_emscripten;
|
// extern crate wasmer_emscripten;
|
||||||
|
Loading…
Reference in New Issue
Block a user