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 | baeab1fc442e2781d0d527f22b3ff4722a35f11c (patch) | |
tree | 7a6780eba1110e7ba99675d0e7993d200fafc142 | |
parent | d293cbd5fd44549bb48314499bc3b266d8967249 (diff) | |
download | bcm5719-llvm-baeab1fc442e2781d0d527f22b3ff4722a35f11c.tar.gz bcm5719-llvm-baeab1fc442e2781d0d527f22b3ff4722a35f11c.zip |
[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
llvm-svn: 367041
-rw-r--r-- | openmp/runtime/src/kmp_stub.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openmp/runtime/src/kmp_stub.cpp b/openmp/runtime/src/kmp_stub.cpp index badbbde7c96..6b5041988d5 100644 --- a/openmp/runtime/src/kmp_stub.cpp +++ b/openmp/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) { |