mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-13 00:51:20 +00:00
Fix unused variable warnings
This commit is contained in:
@ -11,7 +11,7 @@ use super::utils::{allocate_on_stack, copy_cstr_into_wasm, copy_terminated_array
|
||||
use super::EmscriptenData;
|
||||
use wasmer_runtime_core::vm::Ctx;
|
||||
|
||||
pub extern "C" fn _getaddrinfo(one: i32, two: i32, three: i32, four: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _getaddrinfo(_one: i32, _two: i32, _three: i32, _four: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_getaddrinfo");
|
||||
-1
|
||||
}
|
||||
|
@ -3,19 +3,19 @@ use wasmer_runtime_core::vm::Ctx;
|
||||
// TODO: Need to implement.
|
||||
|
||||
/// emscripten: dlopen(filename: *const c_char, flag: c_int) -> *mut c_void
|
||||
pub extern "C" fn _dlopen(filename: u32, flag: u32, _ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _dlopen(_filename: u32, _flag: u32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_dlopen");
|
||||
-1
|
||||
}
|
||||
|
||||
/// emscripten: dlclose(handle: *mut c_void) -> c_int
|
||||
pub extern "C" fn _dlclose(filename: u32, _ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _dlclose(_filename: u32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_dlclose");
|
||||
-1
|
||||
}
|
||||
|
||||
/// emscripten: dlsym(handle: *mut c_void, symbol: *const c_char) -> *mut c_void
|
||||
pub extern "C" fn _dlsym(filepath: u32, symbol: u32, _ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _dlsym(_filepath: u32, _symbol: u32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_dlsym");
|
||||
-1
|
||||
}
|
||||
|
@ -12,6 +12,6 @@ pub extern "C" fn ___unlock(what: c_int, _ctx: &mut Ctx) {
|
||||
}
|
||||
|
||||
// NOTE: Not implemented by Emscripten
|
||||
pub extern "C" fn ___wait(_which: c_int, _varargs: c_int, three: u32, four: u32, _ctx: &mut Ctx) {
|
||||
pub extern "C" fn ___wait(_which: c_int, _varargs: c_int, _three: u32, _four: u32, _ctx: &mut Ctx) {
|
||||
debug!("emscripten::___wait");
|
||||
}
|
||||
|
@ -12,12 +12,12 @@ pub extern "C" fn _llvm_log2_f64(value: f64, _ctx: &mut Ctx) -> f64 {
|
||||
value.log2()
|
||||
}
|
||||
|
||||
pub extern "C" fn _llvm_log10_f32(value: f64, _ctx: &mut Ctx) -> f64 {
|
||||
pub extern "C" fn _llvm_log10_f32(_value: f64, _ctx: &mut Ctx) -> f64 {
|
||||
debug!("emscripten::_llvm_log10_f32");
|
||||
-1.0
|
||||
}
|
||||
|
||||
pub extern "C" fn _llvm_log2_f32(value: f64, _ctx: &mut Ctx) -> f64 {
|
||||
pub extern "C" fn _llvm_log2_f32(_value: f64, _ctx: &mut Ctx) -> f64 {
|
||||
debug!("emscripten::_llvm_log10_f32");
|
||||
-1.0
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ pub extern "C" fn abort_on_cannot_grow_memory(_ctx: &mut Ctx) -> u32 {
|
||||
}
|
||||
|
||||
/// emscripten: ___map_file
|
||||
pub extern "C" fn ___map_file(one: u32, two: u32, _ctx: &mut Ctx) -> c_int {
|
||||
pub extern "C" fn ___map_file(_one: u32, _two: u32, _ctx: &mut Ctx) -> c_int {
|
||||
debug!("emscripten::___map_file");
|
||||
// NOTE: TODO: Em returns -1 here as well. May need to implement properly
|
||||
-1
|
||||
|
@ -28,7 +28,7 @@ pub extern "C" fn _endgrent(_ctx: &mut Ctx) {
|
||||
debug!("emscripten::_endgrent");
|
||||
}
|
||||
|
||||
pub extern "C" fn _execve(one: i32, two: i32, three: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _execve(_one: i32, _two: i32, _three: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_execve");
|
||||
-1
|
||||
}
|
||||
@ -50,60 +50,60 @@ pub extern "C" fn em_abort(message: u32, ctx: &mut Ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
pub extern "C" fn _kill(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _kill(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_kill");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn _llvm_stackrestore(one: i32, ctx: &mut Ctx) {
|
||||
pub extern "C" fn _llvm_stackrestore(_one: i32, _ctx: &mut Ctx) {
|
||||
debug!("emscripten::_llvm_stackrestore");
|
||||
}
|
||||
|
||||
pub extern "C" fn _raise(one: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _raise(_one: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_raise");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn _sem_init(one: i32, two: i32, three: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _sem_init(_one: i32, _two: i32, _three: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_sem_init");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn _sem_post(one: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _sem_post(_one: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_sem_post");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn _sem_wait(one: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _sem_wait(_one: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_sem_post");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn _setgrent(ctx: &mut Ctx) {
|
||||
pub extern "C" fn _setgrent(_ctx: &mut Ctx) {
|
||||
debug!("emscripten::_setgrent");
|
||||
}
|
||||
|
||||
pub extern "C" fn _setgroups(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _setgroups(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_setgroups");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn _setitimer(one: i32, two: i32, three: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _setitimer(_one: i32, _two: i32, _three: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_setitimer");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn _usleep(one: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _usleep(_one: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_usleep");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn _utimes(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _utimes(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_utimes");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn _waitpid(one: i32, two: i32, three: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn _waitpid(_one: i32, _two: i32, _three: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::_waitpid");
|
||||
-1
|
||||
}
|
||||
@ -119,14 +119,14 @@ pub extern "C" fn _llvm_trap(_ctx: &mut Ctx) {
|
||||
abort_with_message("abort!");
|
||||
}
|
||||
|
||||
pub extern "C" fn _system(one: i32, _ctx: &mut Ctx) -> c_int {
|
||||
pub extern "C" fn _system(_one: i32, _ctx: &mut Ctx) -> c_int {
|
||||
debug!("emscripten::_system");
|
||||
// TODO: May need to change this Em impl to a working version
|
||||
eprintln!("Can't call external programs");
|
||||
return EAGAIN;
|
||||
}
|
||||
|
||||
pub extern "C" fn _popen(one: i32, two: i32, _ctx: &mut Ctx) -> c_int {
|
||||
pub extern "C" fn _popen(_one: i32, _two: i32, _ctx: &mut Ctx) -> c_int {
|
||||
debug!("emscripten::_popen");
|
||||
// TODO: May need to change this Em impl to a working version
|
||||
eprintln!("Missing function: popen");
|
||||
|
@ -165,23 +165,23 @@ pub extern "C" fn ___syscall12(which: c_int, mut varargs: VarArgs, ctx: &mut Ctx
|
||||
}
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall10(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall10(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall10");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall15(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall15(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall15");
|
||||
-1
|
||||
}
|
||||
|
||||
// getpid
|
||||
pub extern "C" fn ___syscall20(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall20(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall20 (getpid)");
|
||||
unsafe { getpid() }
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall38(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall38(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall38");
|
||||
-1
|
||||
}
|
||||
@ -253,7 +253,7 @@ pub extern "C" fn ___syscall57(which: c_int, mut varargs: VarArgs, ctx: &mut Ctx
|
||||
unsafe { setpgid(pid, pgid) }
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall60(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall60(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall60");
|
||||
-1
|
||||
}
|
||||
@ -269,32 +269,32 @@ pub extern "C" fn ___syscall63(which: c_int, mut varargs: VarArgs, ctx: &mut Ctx
|
||||
}
|
||||
|
||||
// getppid
|
||||
pub extern "C" fn ___syscall64(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall64(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall64 (getppid)");
|
||||
unsafe { getpid() }
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall66(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall66(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall66");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall75(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall75(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall75");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall85(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall85(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall85");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall91(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall91(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall91");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall97(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall97(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall97");
|
||||
-1
|
||||
}
|
||||
@ -552,7 +552,7 @@ pub extern "C" fn ___syscall102(which: c_int, mut varargs: VarArgs, ctx: &mut Ct
|
||||
}
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall110(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall110(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall110");
|
||||
-1
|
||||
}
|
||||
@ -718,7 +718,7 @@ pub extern "C" fn ___syscall146(which: c_int, mut varargs: VarArgs, ctx: &mut Ct
|
||||
}
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall168(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall168(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall168");
|
||||
-1
|
||||
}
|
||||
@ -761,22 +761,22 @@ pub extern "C" fn ___syscall181(which: c_int, mut varargs: VarArgs, ctx: &mut Ct
|
||||
status
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall191(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall191(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall191 - stub");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall194(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall194(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall194 - stub");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall196(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall196(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall194 - stub");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall199(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall199(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall199 - stub");
|
||||
-1
|
||||
}
|
||||
@ -821,7 +821,7 @@ pub extern "C" fn ___syscall197(which: c_int, mut varargs: VarArgs, ctx: &mut Ct
|
||||
}
|
||||
|
||||
// getgid
|
||||
pub extern "C" fn ___syscall201(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall201(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall201 (getgid)");
|
||||
unsafe {
|
||||
// Maybe fix: Emscripten returns 0 always
|
||||
@ -851,7 +851,7 @@ pub extern "C" fn ___syscall212(which: c_int, mut varargs: VarArgs, ctx: &mut Ct
|
||||
unsafe { chown(pathname_addr, owner, group) }
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall220(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall220(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall220");
|
||||
-1
|
||||
}
|
||||
@ -868,27 +868,27 @@ pub extern "C" fn ___syscall221(which: c_int, mut varargs: VarArgs, ctx: &mut Ct
|
||||
}
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall268(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall268(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall268");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall272(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall272(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall272");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall295(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall295(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall295");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall300(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall300(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall300");
|
||||
-1
|
||||
}
|
||||
|
||||
pub extern "C" fn ___syscall334(one: i32, two: i32, ctx: &mut Ctx) -> i32 {
|
||||
pub extern "C" fn ___syscall334(_one: i32, _two: i32, _ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___syscall334");
|
||||
-1
|
||||
}
|
||||
|
Reference in New Issue
Block a user