[Openmp-commits] [PATCH] D90756: [OpenMP] avoid warning: equality comparison with extraneous parentheses
Joachim Protze via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Nov 5 03:22:03 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7b0ca32b6228: [OpenMP] avoid warning: equality comparison with extraneous parentheses (authored by protze.joachim).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90756/new/
https://reviews.llvm.org/D90756
Files:
openmp/runtime/src/kmp.h
Index: openmp/runtime/src/kmp.h
===================================================================
--- openmp/runtime/src/kmp.h
+++ openmp/runtime/src/kmp.h
@@ -1099,12 +1099,12 @@
#define KMP_TLS_GTID_MIN INT_MAX
#endif
-#define KMP_MASTER_TID(tid) ((tid) == 0)
-#define KMP_WORKER_TID(tid) ((tid) != 0)
+#define KMP_MASTER_TID(tid) (0 == (tid))
+#define KMP_WORKER_TID(tid) (0 != (tid))
-#define KMP_MASTER_GTID(gtid) (__kmp_tid_from_gtid((gtid)) == 0)
-#define KMP_WORKER_GTID(gtid) (__kmp_tid_from_gtid((gtid)) != 0)
-#define KMP_INITIAL_GTID(gtid) ((gtid) == 0)
+#define KMP_MASTER_GTID(gtid) (0 == __kmp_tid_from_gtid((gtid)))
+#define KMP_WORKER_GTID(gtid) (0 != __kmp_tid_from_gtid((gtid)))
+#define KMP_INITIAL_GTID(gtid) (0 == (gtid))
#ifndef TRUE
#define FALSE 0
@@ -2074,7 +2074,7 @@
// The tt_found_tasks flag is a signal to all threads in the team that tasks
// were spawned and queued since the previous barrier release.
#define KMP_TASKING_ENABLED(task_team) \
- (TCR_SYNC_4((task_team)->tt.tt_found_tasks) == TRUE)
+ (TRUE == TCR_SYNC_4((task_team)->tt.tt_found_tasks))
/*!
@ingroup BASIC_TYPES
@{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90756.303068.patch
Type: text/x-patch
Size: 1174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201105/5e6b9cbd/attachment.bin>
More information about the Openmp-commits
mailing list