diff --git a/libc/src/__support/str_to_integer.h b/libc/src/__support/str_to_integer.h index ea17178c6afb6..c8d02434c89ce 100644 --- a/libc/src/__support/str_to_integer.h +++ b/libc/src/__support/str_to_integer.h @@ -115,7 +115,8 @@ strtointeger(const char *__restrict src, int base, : cpp::numeric_limits::max(); ResultType const abs_max = (is_positive ? cpp::numeric_limits::max() : NEGATIVE_MAX); - ResultType const abs_max_div_by_base = abs_max / base; + ResultType const abs_max_div_by_base = + static_cast(abs_max / base); while (src_cur < src_len && isalnum(src[src_cur])) { int cur_digit = b36_char_to_int(src[src_cur]); diff --git a/libc/src/math/generic/exp2m1f16.cpp b/libc/src/math/generic/exp2m1f16.cpp index e6c57d730e3c2..6a1cd2328a050 100644 --- a/libc/src/math/generic/exp2m1f16.cpp +++ b/libc/src/math/generic/exp2m1f16.cpp @@ -126,7 +126,7 @@ LLVM_LIBC_FUNCTION(float16, exp2m1f16, (float16 x)) { case FE_DOWNWARD: return FPBits::one(Sign::NEG).get_val(); default: - return -0x1.ffcp-1; + return fputil::cast(-0x1.ffcp-1); } }