Skip to content

Commit b5f2440

Browse files
fix warnings and add to modulemap
1 parent 08de46e commit b5f2440

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

libcxx/include/module.modulemap

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,18 +1075,19 @@ module std_private_bit_invert_if [system] { header "__bit/invert_if.h" }
10751075
module std_private_bit_popcount [system] { header "__bit/popcount.h" }
10761076
module std_private_bit_rotate [system] { header "__bit/rotate.h" }
10771077

1078-
module std_private_charconv_chars_format [system] { header "__charconv/chars_format.h" }
1079-
module std_private_charconv_from_chars_integral [system] { header "__charconv/from_chars_integral.h" }
1080-
module std_private_charconv_from_chars_result [system] { header "__charconv/from_chars_result.h" }
1081-
module std_private_charconv_tables [system] { header "__charconv/tables.h" }
1082-
module std_private_charconv_to_chars [system] { header "__charconv/to_chars.h" }
1083-
module std_private_charconv_to_chars_base_10 [system] { header "__charconv/to_chars_base_10.h" }
1084-
module std_private_charconv_to_chars_floating_point [system] { header "__charconv/to_chars_floating_point.h" }
1085-
module std_private_charconv_to_chars_integral [system] {
1078+
module std_private_charconv_chars_format [system] { header "__charconv/chars_format.h" }
1079+
module std_private_charconv_from_chars_integral [system] { header "__charconv/from_chars_integral.h" }
1080+
module std_private_charconv_from_chars_result [system] { header "__charconv/from_chars_result.h" }
1081+
module std_private_charconv_tables [system] { header "__charconv/tables.h" }
1082+
module std_private_charconv_to_chars [system] { header "__charconv/to_chars.h" }
1083+
module std_private_charconv_to_chars_base_10 [system] { header "__charconv/to_chars_base_10.h" }
1084+
module std_private_charconv_to_chars_floating_point [system] { header "__charconv/to_chars_floating_point.h" }
1085+
module std_private_charconv_from_chars_floating_point [system] { header "__charconv/from_chars_floating_point.h" }
1086+
module std_private_charconv_to_chars_integral [system] {
10861087
header "__charconv/to_chars_integral.h"
10871088
export std_private_charconv_traits
10881089
}
1089-
module std_private_charconv_to_chars_result [system] {
1090+
module std_private_charconv_to_chars_result [system] {
10901091
header "__charconv/to_chars_result.h"
10911092
export *
10921093
}

libcxx/src/include/from_chars_floating_point.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ from_chars_result from_chars_floating_point(const char* __first, const char* __l
5151

5252
// The loop fills the mantissa with as many digits as it can hold
5353
const _Uint_type bitstype_max_div_by_base = numeric_limits<_Uint_type>::max() / BASE;
54-
while (index < length) {
54+
while (index < static_cast<size_t>(length)) {
5555
if (LIBC_NAMESPACE::internal::isdigit(src[index])) {
5656
uint32_t digit = src[index] - '0';
5757
seen_digit = true;
@@ -86,12 +86,12 @@ from_chars_result from_chars_floating_point(const char* __first, const char* __l
8686
if (!seen_digit)
8787
return {src + index, {}};
8888

89-
if (index < length && LIBC_NAMESPACE::internal::tolower(src[index]) == EXPONENT_MARKER) {
89+
if (index < static_cast<size_t>(length) && LIBC_NAMESPACE::internal::tolower(src[index]) == EXPONENT_MARKER) {
9090
bool has_sign = false;
91-
if (index + 1 < length && (src[index + 1] == '+' || src[index + 1] == '-')) {
91+
if (index + 1 < static_cast<size_t>(length) && (src[index + 1] == '+' || src[index + 1] == '-')) {
9292
has_sign = true;
9393
}
94-
if (index + 1 + static_cast<size_t>(has_sign) < length &&
94+
if (index + 1 + static_cast<size_t>(has_sign) < static_cast<size_t>(length) &&
9595
LIBC_NAMESPACE::internal::isdigit(src[index + 1 + static_cast<size_t>(has_sign)])) {
9696
++index;
9797
auto result = LIBC_NAMESPACE::internal::strtointeger<int32_t>(src + index, 10);

0 commit comments

Comments
 (0)