[Openmp-commits] [openmp] r367041 - [OpenMP] Fix build of stubs library, NFC.
Jonas Hahnfeld via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jul 25 10:51:24 PDT 2019
Author: hahnfeld
Date: Thu Jul 25 10:51:24 2019
New Revision: 367041
URL: http://llvm.org/viewvc/llvm-project?rev=367041&view=rev
Log:
[OpenMP] Fix build of stubs library, NFC.
Both Clang and GCC complained that they cannot initialize a return
object of type 'kmp_proc_bind_t' with an 'int'. While at it, also
fix a warning about missing parentheses thrown by Clang.
Differential Revision: https://reviews.llvm.org/D65284
Modified:
openmp/trunk/runtime/src/kmp_stub.cpp
Modified: openmp/trunk/runtime/src/kmp_stub.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_stub.cpp?rev=367041&r1=367040&r2=367041&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_stub.cpp (original)
+++ openmp/trunk/runtime/src/kmp_stub.cpp Thu Jul 25 10:51:24 2019
@@ -164,7 +164,7 @@ void *kmp_aligned_malloc(size_t sz, size
#if KMP_OS_WINDOWS
res = _aligned_malloc(sz, a);
#else
- if (err = posix_memalign(&res, a, sz)) {
+ if ((err = posix_memalign(&res, a, sz))) {
errno = err; // can be EINVAL or ENOMEM
res = NULL;
}
@@ -277,7 +277,7 @@ void __kmps_get_schedule(kmp_sched_t *ki
kmp_proc_bind_t __kmps_get_proc_bind(void) {
i;
- return 0;
+ return proc_bind_false;
} // __kmps_get_proc_bind
double __kmps_get_wtime(void) {
More information about the Openmp-commits
mailing list