mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-31 06:51:04 +00:00
Various lint fixes
This commit is contained in:
parent
1560849e40
commit
675caf042c
@ -31,7 +31,6 @@ use ::libc::DIR as libcDIR;
|
|||||||
#[cfg(not(unix))]
|
#[cfg(not(unix))]
|
||||||
type libcDIR = u8;
|
type libcDIR = u8;
|
||||||
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod macros;
|
mod macros;
|
||||||
|
|
||||||
|
@ -52,12 +52,15 @@ pub fn killpg(_ctx: &mut Ctx, _a: i32, _b: i32) -> i32 {
|
|||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(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");
|
||||||
let path = emscripten_memory_pointer!(ctx.memory(0), path_ptr) as *const i8;
|
let path = emscripten_memory_pointer!(ctx.memory(0), path_ptr) as *const i8;
|
||||||
unsafe { libc::pathconf(path, name).try_into().unwrap() }
|
unsafe { libc::pathconf(path, name).try_into().unwrap() }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(unix))]
|
#[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
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn setpwent(_ctx: &mut Ctx) {
|
pub fn setpwent(_ctx: &mut Ctx) {
|
||||||
|
@ -894,7 +894,7 @@ pub fn ___syscall220(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
|
|||||||
*(dirp.add(pos + 4) as *mut u32) = pos as u32;
|
*(dirp.add(pos + 4) as *mut u32) = pos as u32;
|
||||||
*(dirp.add(pos + 8) as *mut u16) = offset as u16;
|
*(dirp.add(pos + 8) as *mut u16) = offset as u16;
|
||||||
*(dirp.add(pos + 10) as *mut u8) = (*dirent).d_type;
|
*(dirp.add(pos + 10) as *mut u8) = (*dirent).d_type;
|
||||||
let upper_bound = std::cmp::min((*dirent).d_reclen, 256) as usize;
|
let upper_bound = std::cmp::min((*dirent).d_reclen, 255) as usize;
|
||||||
let mut i = 0;
|
let mut i = 0;
|
||||||
while i < upper_bound {
|
while i < upper_bound {
|
||||||
*(dirp.add(pos + 11 + i) as *mut i8) = (*dirent).d_name[i];
|
*(dirp.add(pos + 11 + i) as *mut i8) = (*dirent).d_name[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user