Skip to content

Commit 958813a

Browse files
better cast
1 parent 47c95c9 commit 958813a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

libc/src/__support/big_int.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,7 @@ LIBC_INLINE constexpr cpp::array<word, N> shift(cpp::array<word, N> array,
296296
for (size_t index = 0; index < N; ++index) {
297297
const word part1 = safe_get_at(index + index_offset);
298298
const word part2 = safe_get_at(index + index_offset + 1);
299-
#pragma GCC diagnostic push
300-
#pragma GCC diagnostic ignored "-Wsign-conversion"
301-
word &dst = out[at(index)];
302-
#pragma GCC diagnostic pop
299+
word &dst = out[static_cast<size_t>(at(index))];
303300
if (bit_offset == 0)
304301
dst = part1; // no crosstalk between parts.
305302
else if constexpr (direction == LEFT)

0 commit comments

Comments
 (0)