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=MarkMcCaskey a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
  • Loading branch information
bors[bot] and MarkMcCaskey committed Mar 26, 2019
2 parents ccb5b0f + 18d2df8 commit ad897b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Expand Up @@ -19,9 +19,9 @@ jobs:
name: Install lint deps
command: |
git config --global --unset url."ssh://git@github.com".insteadOf || true
rustup toolchain install nightly
rustup toolchain install nightly-2019-02-27
rustup component add rustfmt
rustup component add clippy --toolchain=nightly || cargo +nightly install --git https://github.com/rust-lang/rust-clippy/ --force clippy
rustup component add clippy --toolchain=nightly-2019-02-27 || cargo +nightly-2019-02-27 install --git https://github.com/rust-lang/rust-clippy/ --force clippy
- run:
name: Execute lints
command: |
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:
sudo apt-get install -y cmake
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
- run: rustup default nightly
- run: rustup default nightly-2019-02-27
- run: |
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"
make test
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -28,7 +28,7 @@ integration-tests: release

lint:
cargo fmt --all -- --check
cargo +nightly clippy --all
cargo +nightly-2019-02-27 clippy --all

precommit: lint test

Expand Down
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 ad897b2

Please sign in to comment.