[Openmp-commits] [openmp] 5e58b63 - [OpenMP] libomp: fix warning on comparison of integer expressions of different signedness

via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 13 10:11:57 PDT 2021


Author: AndreyChurbanov
Date: 2021-10-13T20:11:47+03:00
New Revision: 5e58b63b28695e4174a1c6ee57867f8aaff2b21d

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

LOG: [OpenMP] libomp: fix warning on comparison of integer expressions of different signedness

Replaced macro with global variable of correspondent type.

Differential Revision: https://reviews.llvm.org/D111562

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 8a3bd4cd60ce6..00830b57e3b8d 100644
--- a/openmp/runtime/src/kmp_settings.cpp
+++ b/openmp/runtime/src/kmp_settings.cpp
@@ -302,8 +302,8 @@ void __kmp_check_stksize(size_t *val) {
   // if system stack size is too big then limit the size for worker threads
   if (*val > KMP_DEFAULT_STKSIZE * 16) // just a heuristics...
     *val = KMP_DEFAULT_STKSIZE * 16;
-  if (*val < KMP_MIN_STKSIZE)
-    *val = KMP_MIN_STKSIZE;
+  if (*val < __kmp_sys_min_stksize)
+    *val = __kmp_sys_min_stksize;
   if (*val > KMP_MAX_STKSIZE)
     *val = KMP_MAX_STKSIZE; // dead code currently, but may work in future
 #if KMP_OS_DARWIN


        


More information about the Openmp-commits mailing list