Skip to content

Commit 060d03d

Browse files
committed
Clippy: silence a false-positive cast alignment warning
1 parent 9e36014 commit 060d03d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sys/socket/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,9 @@ impl ControlMessageOwned {
543543
///
544544
/// Returns `None` if the data may be unaligned. In that case use
545545
/// `ControlMessageOwned::decode_from`.
546+
// Clippy complains about the pointer alignment of `p`, not understanding
547+
// that it's being fed to a function that can handle that.
548+
#[allow(clippy::cast_ptr_alignment)]
546549
unsafe fn decode_from(header: &cmsghdr) -> ControlMessageOwned
547550
{
548551
let p = CMSG_DATA(header);

0 commit comments

Comments
 (0)