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

via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 11 08:26:57 PDT 2024


Author: Jonathan Peyton
Date: 2024-03-11T10:26:53-05:00
New Revision: b4e39ad1176aa7fc1528aa3f7b447bf27350549f

URL: https://github.com/llvm/llvm-project/commit/b4e39ad1176aa7fc1528aa3f7b447bf27350549f
DIFF: https://github.com/llvm/llvm-project/commit/b4e39ad1176aa7fc1528aa3f7b447bf27350549f.diff

LOG: [OpenMP] Remove dead code of checking int > INT_MAX (#83305)

Added: 
    

Modified: 
    openmp/runtime/src/kmp_settings.cpp

Removed: 
    


################################################################################
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