diff options
author | Alan Somers <asomers@gmail.com> | 2019-08-19 16:26:24 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2019-08-29 10:06:03 -0600 |
commit | 060d03d4500ca7d65428235173c27b60326c536c (patch) | |
tree | 197ed4c9c83d9456cd9f8081cb3f7f10a37473a0 /src/sys/socket/mod.rs | |
parent | 9e360145be630275a9b8a73dc32462ef406d20f6 (diff) | |
download | nix-060d03d4500ca7d65428235173c27b60326c536c.zip |
Clippy: silence a false-positive cast alignment warning
Diffstat (limited to 'src/sys/socket/mod.rs')
-rw-r--r-- | src/sys/socket/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 8ea7fb9f..6c67648b 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -543,6 +543,9 @@ impl ControlMessageOwned { /// /// Returns `None` if the data may be unaligned. In that case use /// `ControlMessageOwned::decode_from`. + // Clippy complains about the pointer alignment of `p`, not understanding + // that it's being fed to a function that can handle that. + #[allow(clippy::cast_ptr_alignment)] unsafe fn decode_from(header: &cmsghdr) -> ControlMessageOwned { let p = CMSG_DATA(header); |