diff --git a/lib/emscripten/src/io/unix.rs b/lib/emscripten/src/io/unix.rs index 24ee38f4c..e8f1a6fa5 100644 --- a/lib/emscripten/src/io/unix.rs +++ b/lib/emscripten/src/io/unix.rs @@ -41,13 +41,17 @@ pub fn getpwuid(ctx: &mut Ctx, uid: i32) -> i32 { pw_dir: u32, pw_shell: u32, } - + unsafe { let passwd = &*_getpwuid(uid as _); let passwd_struct_offset = call_malloc(ctx, mem::size_of::() as _); let passwd_struct_ptr = emscripten_memory_pointer!(ctx.memory(0), passwd_struct_offset) as *mut GuestPasswd; - assert_eq!(passwd_struct_ptr as usize % std::cmp::min(std::mem::size_of::(), std::mem::align_of::()), 0); + assert_eq!( + passwd_struct_ptr as usize + % std::cmp::min(std::mem::size_of::(), std::mem::align_of::()), + 0 + ); (*passwd_struct_ptr).pw_name = copy_cstr_into_wasm(ctx, passwd.pw_name); (*passwd_struct_ptr).pw_passwd = copy_cstr_into_wasm(ctx, passwd.pw_passwd); (*passwd_struct_ptr).pw_gecos = copy_cstr_into_wasm(ctx, passwd.pw_gecos); diff --git a/lib/emscripten/src/libc.rs b/lib/emscripten/src/libc.rs index 1f5629ddf..988f9c11b 100644 --- a/lib/emscripten/src/libc.rs +++ b/lib/emscripten/src/libc.rs @@ -58,7 +58,7 @@ pub fn pathconf(ctx: &mut Ctx, path_ptr: i32, name: i32) -> i32 { } #[cfg(not(unix))] -pub fn pathconf(ctx: &mut Ctx, path_ptr: i32, name: i32) -> i32 { +pub fn pathconf(_ctx: &mut Ctx, _path_ptr: i32, _name: i32) -> i32 { debug!("emscripten::pathconf"); 0 }