summaryrefslogtreecommitdiff
path: root/src/sys/socket/mod.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2019-08-19 16:26:24 -0600
committerAlan Somers <asomers@gmail.com>2019-08-29 10:06:03 -0600
commit060d03d4500ca7d65428235173c27b60326c536c (patch)
tree197ed4c9c83d9456cd9f8081cb3f7f10a37473a0 /src/sys/socket/mod.rs
parent9e360145be630275a9b8a73dc32462ef406d20f6 (diff)
downloadnix-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.rs3
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);