Skip to content

Commit 301c8e0

Browse files
committed
Fix S/390 warning.
1 parent 07e6101 commit 301c8e0

File tree

1 file changed

+2
-2
lines changed
  • crates/std_detect/src/detect/os/linux

1 file changed

+2
-2
lines changed

crates/std_detect/src/detect/os/linux/auxvec.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,10 @@ pub(crate) fn auxv() -> Result<AuxVec, ()> {
8989

9090
#[cfg(not(feature = "std_detect_dlsym_getauxval"))]
9191
{
92-
let hwcap = unsafe { libc::getauxval(AT_HWCAP as libc::c_ulong) as usize };
93-
9492
// Targets with only AT_HWCAP:
9593
#[cfg(any(target_arch = "aarch64", target_arch = "mips", target_arch = "mips64"))]
9694
{
95+
let hwcap = unsafe { libc::getauxval(AT_HWCAP as libc::c_ulong) as usize };
9796
if hwcap != 0 {
9897
return Ok(AuxVec { hwcap });
9998
}
@@ -106,6 +105,7 @@ pub(crate) fn auxv() -> Result<AuxVec, ()> {
106105
target_arch = "powerpc64"
107106
))]
108107
{
108+
let hwcap = unsafe { libc::getauxval(AT_HWCAP as libc::c_ulong) as usize };
109109
let hwcap2 = unsafe { libc::getauxval(AT_HWCAP2 as libc::c_ulong) as usize };
110110
if hwcap != 0 && hwcap2 != 0 {
111111
return Ok(AuxVec { hwcap, hwcap2 });

0 commit comments

Comments
 (0)