[libc-commits] [libc] [libc][NFC] Remove a compiler warning for MPCommon (PR #205264)
via libc-commits
libc-commits at lists.llvm.org
Tue Jun 23 19:02:44 PDT 2026
https://github.com/jinge90 updated https://github.com/llvm/llvm-project/pull/205264
>From 9d1111f7a823c93da52356f1112549d4d2d2785a Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Tue, 23 Jun 2026 13:55:00 +0800
Subject: [PATCH] remove warning for MPCommon
Signed-off-by: jinge90 <ge.jin at intel.com>
---
libc/utils/MPFRWrapper/MPCommon.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/utils/MPFRWrapper/MPCommon.cpp b/libc/utils/MPFRWrapper/MPCommon.cpp
index bdd8286148641..452a1391058d4 100644
--- a/libc/utils/MPFRWrapper/MPCommon.cpp
+++ b/libc/utils/MPFRWrapper/MPCommon.cpp
@@ -543,7 +543,7 @@ MPFRNumber MPFRNumber::tanpi() const {
mpfr_mul_si(value_ret_exact.value, value_ret_exact.value, 4, MPFR_RNDN);
if (mpfr_integer_p(value_ret_exact.value)) {
- int mod = mpfr_get_si(value_ret_exact.value, MPFR_RNDN);
+ long mod = mpfr_get_si(value_ret_exact.value, MPFR_RNDN);
mod = (mod < 0 ? -1 * mod : mod);
switch (mod) {
More information about the libc-commits
mailing list