diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2019-11-01 16:08:48 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-08 22:18:18 +0000 |
commit | 2ad6124eebdeacabe57f551afa3dd6616cf38334 (patch) | |
tree | 0a09eb5a65da52dbcc60aa9510796384b55510e4 /kvm | |
parent | a1bc67ffd7bac7bdd26fe0453a3020673a9f3786 (diff) | |
download | crosvm-2ad6124eebdeacabe57f551afa3dd6616cf38334.tar crosvm-2ad6124eebdeacabe57f551afa3dd6616cf38334.tar.gz crosvm-2ad6124eebdeacabe57f551afa3dd6616cf38334.tar.bz2 crosvm-2ad6124eebdeacabe57f551afa3dd6616cf38334.tar.lz crosvm-2ad6124eebdeacabe57f551afa3dd6616cf38334.tar.xz crosvm-2ad6124eebdeacabe57f551afa3dd6616cf38334.tar.zst crosvm-2ad6124eebdeacabe57f551afa3dd6616cf38334.zip |
kvm: silence clippy warning about pointer alignment
Ignore the clippy warning about pointer alignment in casts in set_thread_id(), matching the existing annotation for set_data(). run_mmap is sufficiently aligned, since it is a mmap-ed region with at least page alignment. Fixes this clippy error: casting from `*mut u8` to a more-strictly-aligned pointer (`*mut kvm_sys::x86::bindings::kvm_run`) (1 < 8 bytes) BUG=None TEST=bin/clippy Change-Id: I4c33385d081d785002dda2d589eeb3ed10a92bfc Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1896089 Reviewed-by: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'kvm')
-rw-r--r-- | kvm/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kvm/src/lib.rs b/kvm/src/lib.rs index 17b22c9..ba8567c 100644 --- a/kvm/src/lib.rs +++ b/kvm/src/lib.rs @@ -1190,6 +1190,7 @@ impl Vcpu { /// by signal handlers to call set_local_immediate_exit(). Signal /// number (if provided, otherwise use -1) will be temporily blocked when the vcpu /// is added to the map, or later destroyed/removed from the map. + #[allow(clippy::cast_ptr_alignment)] pub fn set_thread_id(&mut self, signal_num: c_int) { // Block signal while we add -- if a signal fires (very unlikely, // as this means something is trying to pause the vcpu before it has |