mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 22:05:33 +00:00
Add deny for unreachable patterns and unused unsafe
This commit is contained in:
parent
8d2a08a1be
commit
2aefa731a6
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
|
||||
mod cache;
|
||||
mod func_env;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate wasmer_runtime_core;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
#![cfg_attr(nightly, feature(unwind_attributes))]
|
||||
|
||||
mod backend;
|
||||
|
@ -1,3 +1,3 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
|
||||
pub mod call_trace;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
#[macro_use]
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
|
||||
extern crate wasmer_runtime;
|
||||
extern crate wasmer_runtime_core;
|
||||
|
@ -35,7 +35,6 @@ impl fmt::Debug for InternalEvent {
|
||||
InternalEvent::Breakpoint(_) => write!(f, "Breakpoint"),
|
||||
InternalEvent::SetInternal(_) => write!(f, "SetInternal"),
|
||||
InternalEvent::GetInternal(_) => write!(f, "GetInternal"),
|
||||
_ => panic!("unknown event"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
#![cfg_attr(nightly, feature(unwind_attributes))]
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
|
||||
//! Wasmer-runtime is a library that makes embedding WebAssembly
|
||||
//! in your application easy, efficient, and safe.
|
||||
|
@ -212,10 +212,10 @@ impl RunnableModule for X64ExecutionContext {
|
||||
user_error: *mut Option<Box<dyn Any>>,
|
||||
num_params_plus_one: Option<NonNull<c_void>>,
|
||||
) -> bool {
|
||||
let rm: &Box<dyn RunnableModule> = &unsafe { &*(*ctx).module }.runnable_module;
|
||||
let execution_context = unsafe {
|
||||
::std::mem::transmute_copy::<&dyn RunnableModule, &X64ExecutionContext>(&&**rm)
|
||||
};
|
||||
let rm: &Box<dyn RunnableModule> = &(&*(*ctx).module).runnable_module;
|
||||
let execution_context =
|
||||
::std::mem::transmute_copy::<&dyn RunnableModule, &X64ExecutionContext>(&&**rm);
|
||||
|
||||
let args = ::std::slice::from_raw_parts(
|
||||
args,
|
||||
num_params_plus_one.unwrap().as_ptr() as usize - 1,
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
#[cfg(not(any(
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
|
||||
#[cfg(windows)]
|
||||
mod exception_handling;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
|
||||
extern crate structopt;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![deny(unused_imports, unused_variables)]
|
||||
#![deny(unused_imports, unused_variables, unused_unsafe, unreachable_patterns)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate wasmer_runtime_core;
|
||||
|
Loading…
Reference in New Issue
Block a user