Skip to content

Commit

Permalink
Merge #291
Browse files Browse the repository at this point in the history
291: fix alignment check on pointer r=syrusakbary a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
  • Loading branch information
bors[bot] and MarkMcCaskey committed Mar 26, 2019
2 parents ccb5b0f + d2818b1 commit 25b1756
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/emscripten/src/syscalls/mod.rs
Expand Up @@ -266,7 +266,7 @@ pub fn ___syscall140(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
let ret = unsafe { lseek(fd, offset, whence) as i32 };
#[allow(clippy::cast_ptr_alignment)]
let result_ptr = emscripten_memory_pointer!(ctx.memory(0), result_ptr_value) as *mut i32;
assert_eq!(4, mem::align_of_val(&result_ptr));
assert_eq!(8, mem::align_of_val(&result_ptr));
unsafe {
*result_ptr = ret;
}
Expand Down

0 comments on commit 25b1756

Please sign in to comment.