[Openmp-commits] [PATCH] D51303: [OpenMP][Fix] Conditional compilation leaves variables unused
Gheorghe-Teodor Bercea via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 27 07:08:57 PDT 2018
gtbercea created this revision.
gtbercea added reviewers: ABataev, grokos, Hahnfeld, caomhin.
Herald added subscribers: openmp-commits, guansong.
Prevent variables from being left unused by conditional compilation.
Repository:
rOMP OpenMP
https://reviews.llvm.org/D51303
Files:
runtime/src/kmp_csupport.cpp
Index: runtime/src/kmp_csupport.cpp
===================================================================
--- runtime/src/kmp_csupport.cpp
+++ runtime/src/kmp_csupport.cpp
@@ -2567,9 +2567,9 @@
codeptr);
}
}
-#endif
int acquire_status =
KMP_D_LOCK_FUNC(user_lock, set)((kmp_dyna_lock_t *)user_lock, gtid);
+#endif
#if USE_ITT_BUILD
__kmp_itt_lock_acquired((kmp_user_lock_p)user_lock);
#endif
@@ -2758,10 +2758,10 @@
#if USE_ITT_BUILD
__kmp_itt_lock_releasing((kmp_user_lock_p)user_lock);
#endif
- int release_status =
- KMP_D_LOCK_FUNC(user_lock, unset)((kmp_dyna_lock_t *)user_lock, gtid);
#if OMPT_SUPPORT && OMPT_OPTIONAL
+ int release_status =
+ KMP_D_LOCK_FUNC(user_lock, unset)((kmp_dyna_lock_t *)user_lock, gtid);
// This is the case, if called from omp_init_lock_with_hint:
void *codeptr = OMPT_LOAD_RETURN_ADDRESS(gtid);
if (!codeptr)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51303.162672.patch
Type: text/x-patch
Size: 905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180827/ad43b3c5/attachment.bin>
More information about the Openmp-commits
mailing list