Cleanup warnings with nvhpc/21.9.
This commit is contained in:
parent
812733cc96
commit
ec220be0c0
@ -279,7 +279,7 @@
|
||||
|
||||
// Enable minimal optimizations for more compact code in debug mode.
|
||||
FMT_GCC_PRAGMA("GCC push_options")
|
||||
#ifndef __OPTIMIZE__
|
||||
#if !defined(__OPTIMIZE__) && !defined(__NVCOMPILER)
|
||||
FMT_GCC_PRAGMA("GCC optimize(\"Og\")")
|
||||
#endif
|
||||
|
||||
|
||||
@ -967,14 +967,17 @@ FMT_CONSTEXPR20 inline auto count_digits(uint64_t n) -> int {
|
||||
template <int BITS, typename UInt>
|
||||
FMT_CONSTEXPR auto count_digits(UInt n) -> int {
|
||||
#ifdef FMT_BUILTIN_CLZ
|
||||
if (num_bits<UInt>() == 32)
|
||||
if (num_bits<UInt>() == 32) {
|
||||
return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1;
|
||||
} else
|
||||
#endif
|
||||
int num_digits = 0;
|
||||
do {
|
||||
++num_digits;
|
||||
} while ((n >>= BITS) != 0);
|
||||
return num_digits;
|
||||
{
|
||||
int num_digits = 0;
|
||||
do {
|
||||
++num_digits;
|
||||
} while ((n >>= BITS) != 0);
|
||||
return num_digits;
|
||||
}
|
||||
}
|
||||
|
||||
template <> auto count_digits<4>(detail::fallback_uintptr n) -> int;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user