diff options
author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2019-07-25 17:51:24 +0000 |
---|---|---|
committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2019-07-25 17:51:24 +0000 |
commit | ca7d371ddfa08d131688282b20a2f678a4339b9f (patch) | |
tree | 23953088110867a0a00dd76b53fa7e3c3037afae | |
parent | b9b98019a08fabd76e4d5b3f161702c3696ccd33 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@367041 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | runtime/src/kmp_stub.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/src/kmp_stub.cpp b/runtime/src/kmp_stub.cpp index badbbde..6b50419 100644 --- a/runtime/src/kmp_stub.cpp +++ b/runtime/src/kmp_stub.cpp @@ -164,7 +164,7 @@ void *kmp_aligned_malloc(size_t sz, size_t a) { #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 *kind, int *modifier) { 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) { |