mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-24 22:21:32 +00:00
Fixed last linting issues
(hopefully)
This commit is contained in:
@ -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::<GuestPasswd>() 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::<usize>(), std::mem::align_of::<usize>()), 0);
|
||||
assert_eq!(
|
||||
passwd_struct_ptr as usize
|
||||
% std::cmp::min(std::mem::size_of::<usize>(), std::mem::align_of::<usize>()),
|
||||
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);
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user