Skip to content

Commit b1372fe

Browse files
committed
[libc] Fix -Wimplicit-int-conversion warnings
Differential Revision: https://reviews.llvm.org/D140492
1 parent 3589885 commit b1372fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libc/src/__support/StringUtil/message_mapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ template <size_t ARR_SIZE, size_t TOTAL_STR_LEN> class MessageMapper {
4545
for (size_t i = 0; i < raw_array_len; ++i)
4646
string_mappings[raw_array[i].num] = raw_array[i].msg;
4747

48-
size_t string_array_index = 0;
48+
int string_array_index = 0;
4949
for (size_t cur_num = 0; cur_num < ARR_SIZE; ++cur_num) {
5050
if (string_mappings[cur_num].size() != 0) {
5151
msg_offsets[cur_num] = string_array_index;

libc/src/__support/integer_to_string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class IntegerToString {
5959
} else {
6060
for (; uval > 0; --buffptr, uval /= conv_base) {
6161
uintmax_t digit = (uval % conv_base);
62-
buffer[buffptr - 1] = digit < 10 ? digit + '0' : digit + a - 10;
62+
buffer[buffptr - 1] = static_cast<char>(digit < 10 ? digit + '0' : digit + a - 10);
6363
}
6464
}
6565
len = buffer.size() - buffptr;

0 commit comments

Comments
 (0)