[Openmp-commits] [openmp] [OpenMP] Remove dead code of checking int > INT_MAX (PR #83305)

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Wed Feb 28 09:36:18 PST 2024


https://github.com/jpeyton52 created https://github.com/llvm/llvm-project/pull/83305

None

>From b533762684c2f7d0e39fa28adda481b87d8ba07a Mon Sep 17 00:00:00 2001
From: Jonathan Peyton <jonathan.l.peyton at intel.com>
Date: Tue, 27 Feb 2024 17:15:55 -0600
Subject: [PATCH] [OpenMP] Remove dead code of int > INT_MAX

---
 openmp/runtime/src/kmp_settings.cpp | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/openmp/runtime/src/kmp_settings.cpp b/openmp/runtime/src/kmp_settings.cpp
index ec86ee07472c1e..abca4d2d7525f5 100644
--- a/openmp/runtime/src/kmp_settings.cpp
+++ b/openmp/runtime/src/kmp_settings.cpp
@@ -4889,9 +4889,6 @@ static void __kmp_stg_parse_spin_backoff_params(const char *name,
       if (num <= 0) { // The number of retries should be > 0
         msg = KMP_I18N_STR(ValueTooSmall);
         num = 1;
-      } else if (num > KMP_INT_MAX) {
-        msg = KMP_I18N_STR(ValueTooLarge);
-        num = KMP_INT_MAX;
       }
       if (msg != NULL) {
         // Message is not empty. Print warning.
@@ -4988,9 +4985,6 @@ static void __kmp_stg_parse_adaptive_lock_props(const char *name,
       if (num < 0) { // The number of retries should be >= 0
         msg = KMP_I18N_STR(ValueTooSmall);
         num = 1;
-      } else if (num > KMP_INT_MAX) {
-        msg = KMP_I18N_STR(ValueTooLarge);
-        num = KMP_INT_MAX;
       }
       if (msg != NULL) {
         // Message is not empty. Print warning.



More information about the Openmp-commits mailing list