[libc-commits] [libc] [libc][NFC] Remove a compiler warning for MPCommon (PR #205264)

via libc-commits libc-commits at lists.llvm.org
Mon Jun 22 22:57:42 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: jinge90

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/205264.diff


1 Files Affected:

- (modified) libc/utils/MPFRWrapper/MPCommon.cpp (+1-1) 


``````````diff
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) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/205264


More information about the libc-commits mailing list