[libunwind] Silence warnings when __mips_hard_float is not defined
The warnings started showing up for me with c53c2058ffb8 which builds
Registers.hpp.
GitOrigin-RevId: abc238a3c736191cc24a517428ededf043d7d713
diff --git a/src/Registers.hpp b/src/Registers.hpp
index 416ed61..ffc75ee 100644
--- a/src/Registers.hpp
+++ b/src/Registers.hpp
@@ -2869,6 +2869,8 @@
#if defined(__mips_hard_float) && __mips_fpr == 64
if (regNum >= UNW_MIPS_F0 && regNum <= UNW_MIPS_F31)
return true;
+#else
+ (void)regNum;
#endif
return false;
}
@@ -2878,6 +2880,7 @@
assert(validFloatRegister(regNum));
return _floats[regNum - UNW_MIPS_F0];
#else
+ (void)regNum;
_LIBUNWIND_ABORT("mips_o32 float support not implemented");
#endif
}
@@ -2888,6 +2891,8 @@
assert(validFloatRegister(regNum));
_floats[regNum - UNW_MIPS_F0] = value;
#else
+ (void)regNum;
+ (void)value;
_LIBUNWIND_ABORT("mips_o32 float support not implemented");
#endif
}
@@ -3159,6 +3164,8 @@
#ifdef __mips_hard_float
if (regNum >= UNW_MIPS_F0 && regNum <= UNW_MIPS_F31)
return true;
+#else
+ (void)regNum;
#endif
return false;
}
@@ -3168,6 +3175,7 @@
assert(validFloatRegister(regNum));
return _floats[regNum - UNW_MIPS_F0];
#else
+ (void)regNum;
_LIBUNWIND_ABORT("mips_newabi float support not implemented");
#endif
}
@@ -3178,6 +3186,8 @@
assert(validFloatRegister(regNum));
_floats[regNum - UNW_MIPS_F0] = value;
#else
+ (void)regNum;
+ (void)value;
_LIBUNWIND_ABORT("mips_newabi float support not implemented");
#endif
}
@@ -3757,6 +3767,7 @@
assert(validFloatRegister(regNum));
return _floats[regNum - UNW_RISCV_F0];
#else
+ (void)regNum;
_LIBUNWIND_ABORT("libunwind not built with float support");
#endif
}
@@ -3766,6 +3777,8 @@
assert(validFloatRegister(regNum));
_floats[regNum - UNW_RISCV_F0] = value;
#else
+ (void)regNum;
+ (void)value;
_LIBUNWIND_ABORT("libunwind not built with float support");
#endif
}