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