Skip to content

Commit 8948e7a

Browse files
committed
aix: Resolve function comparison and unnecessary_transmutes warnings
(backport <#4780>) (cherry picked from commit c819173)
1 parent 6eac4e5 commit 8948e7a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/unix/aix/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ s! {
326326
pub cmsg_type: c_int,
327327
}
328328

329+
// FIXME(1.0): This should not implement `PartialEq`
330+
#[allow(unpredictable_function_pointer_comparisons)]
329331
pub struct sigevent {
330332
pub sigev_value: crate::sigval,
331333
pub sigev_signo: c_int,

src/unix/aix/powerpc64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ cfg_if! {
448448

449449
impl hash::Hash for fpreg_t {
450450
fn hash<H: hash::Hasher>(&self, state: &mut H) {
451-
let d: u64 = unsafe { mem::transmute(self.d) };
451+
let d: u64 = self.d.to_bits();
452452
d.hash(state);
453453
}
454454
}

0 commit comments

Comments
 (0)