Skip to content

Commit bd589f5

Browse files
authored
[libc] Move statement inside #ifdef/#endif to prevent unused variable warning
This is a fix forward for arm32 `/llvm/libc_worker/worker/libc-arm32-debian/libc-arm32-debian-dbg/llvm-project/libc/src/__support/big_int.h:259:20: error: unused variable 'TOTAL_BITS' [-Werror,-Wunused-variable]` https://lab.llvm.org/buildbot/#/builders/229/builds/24791
1 parent 7f9f82e commit bd589f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/src/__support/big_int.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ LIBC_INLINE constexpr cpp::array<word, N> shift(cpp::array<word, N> array,
256256
size_t offset) {
257257
static_assert(direction == LEFT || direction == RIGHT);
258258
constexpr size_t WORD_BITS = cpp::numeric_limits<word>::digits;
259-
constexpr size_t TOTAL_BITS = N * WORD_BITS;
260259
#ifdef LIBC_TYPES_HAS_INT128
260+
constexpr size_t TOTAL_BITS = N * WORD_BITS;
261261
if constexpr (TOTAL_BITS == 128) {
262262
using type = cpp::conditional_t<is_signed, __int128_t, __uint128_t>;
263263
auto tmp = cpp::bit_cast<type>(array);

0 commit comments

Comments
 (0)