[libc-commits] [libc] 31ccceb - [libc][NFC] Make explicit casts for gcc
Alex Brachet via libc-commits
libc-commits at lists.llvm.org
Wed Jul 13 09:53:46 PDT 2022
Author: Alex Brachet
Date: 2022-07-13T16:53:39Z
New Revision: 31cccebb5c811a3d63146005d15a4e3b4f819980
URL: https://github.com/llvm/llvm-project/commit/31cccebb5c811a3d63146005d15a4e3b4f819980
DIFF: https://github.com/llvm/llvm-project/commit/31cccebb5c811a3d63146005d15a4e3b4f819980.diff
LOG: [libc][NFC] Make explicit casts for gcc
Added:
Modified:
libc/src/__support/high_precision_decimal.h
Removed:
################################################################################
diff --git a/libc/src/__support/high_precision_decimal.h b/libc/src/__support/high_precision_decimal.h
index 16d0ef8cc903..94bc51a0cfa1 100644
--- a/libc/src/__support/high_precision_decimal.h
+++ b/libc/src/__support/high_precision_decimal.h
@@ -299,7 +299,8 @@ class HighPrecisionDecimal {
continue;
}
if (this->num_digits < MAX_NUM_DIGITS) {
- this->digits[this->num_digits] = *numString - '0';
+ this->digits[this->num_digits] =
+ static_cast<uint8_t>(*numString - '0');
++this->num_digits;
} else if (*numString != '0') {
this->truncated = true;
More information about the libc-commits
mailing list