[Openmp-commits] [PATCH] D50774: [OMPT] Update types according to TR7

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 27 11:15:45 PDT 2018


Hahnfeld added inline comments.


================
Comment at: runtime/src/kmp_csupport.cpp:2571
   int acquire_status =
       KMP_D_LOCK_FUNC(user_lock, set)((kmp_dyna_lock_t *)user_lock, gtid);
+#endif
----------------
Hahnfeld wrote:
> protze.joachim wrote:
> > hbae wrote:
> > > Invocation of the lock function should be outside of the OMPT code.
> > hbae is right, the function call must be there, only the variable is ompt-specific.
> > 
> > What you actually might do is leaving the declaration and assignment in the ifdef, but move the function call out. This should avoid compiler warnings on unused variable `acquire_status`
> Just comment, no suggestion for either solution: You can also do `(void) acquire_status;`. I think that's used a lot in Clang's source code and will also avoid the compiler warning.
Fixed in D51303.


https://reviews.llvm.org/D50774





More information about the Openmp-commits mailing list