[Openmp-commits] [PATCH] D65869: [OMPT] Resolve warnings because of ints in if conditions
Jonas Hahnfeld via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Aug 15 06:26:00 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL369001: [OMPT] Resolve warnings because of ints in if conditions (authored by Hahnfeld, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D65869?vs=213865&id=215383#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65869/new/
https://reviews.llvm.org/D65869
Files:
openmp/trunk/runtime/cmake/LibompHandleFlags.cmake
openmp/trunk/runtime/cmake/config-ix.cmake
openmp/trunk/runtime/src/ompt-general.cpp
Index: openmp/trunk/runtime/cmake/config-ix.cmake
===================================================================
--- openmp/trunk/runtime/cmake/config-ix.cmake
+++ openmp/trunk/runtime/cmake/config-ix.cmake
@@ -52,7 +52,6 @@
check_cxx_compiler_flag(-Wno-covered-switch-default LIBOMP_HAVE_WNO_COVERED_SWITCH_DEFAULT_FLAG)
check_cxx_compiler_flag(-Wno-frame-address LIBOMP_HAVE_WNO_FRAME_ADDRESS_FLAG)
check_cxx_compiler_flag(-Wno-implicit-fallthrough LIBOMP_HAVE_WNO_IMPLICIT_FALLTHROUGH_FLAG)
-check_cxx_compiler_flag(-Wno-int-in-bool-context LIBOMP_HAVE_WNO_INT_IN_BOOL_CONTEXT_FLAG)
check_cxx_compiler_flag(-Wno-missing-braces LIBOMP_HAVE_WNO_MISSING_BRACES_FLAG)
check_cxx_compiler_flag(-Wno-parentheses LIBOMP_HAVE_WNO_PARENTHESES_FLAG)
check_cxx_compiler_flag(-Wno-strict-aliasing LIBOMP_HAVE_WNO_STRICT_ALIASING_FLAG)
Index: openmp/trunk/runtime/cmake/LibompHandleFlags.cmake
===================================================================
--- openmp/trunk/runtime/cmake/LibompHandleFlags.cmake
+++ openmp/trunk/runtime/cmake/LibompHandleFlags.cmake
@@ -31,7 +31,6 @@
libomp_append(flags_local -Wno-covered-switch-default LIBOMP_HAVE_WNO_COVERED_SWITCH_DEFAULT_FLAG)
libomp_append(flags_local -Wno-frame-address LIBOMP_HAVE_WNO_FRAME_ADDRESS_FLAG)
libomp_append(flags_local -Wno-implicit-fallthrough LIBOMP_HAVE_WNO_IMPLICIT_FALLTHROUGH_FLAG)
- libomp_append(flags_local -Wno-int-in-bool-context LIBOMP_HAVE_WNO_INT_IN_BOOL_CONTEXT_FLAG)
libomp_append(flags_local -Wno-missing-braces LIBOMP_HAVE_WNO_MISSING_BRACES_FLAG)
libomp_append(flags_local -Wno-parentheses LIBOMP_HAVE_WNO_PARENTHESES_FLAG)
libomp_append(flags_local -Wno-strict-aliasing LIBOMP_HAVE_WNO_STRICT_ALIASING_FLAG)
Index: openmp/trunk/runtime/src/ompt-general.cpp
===================================================================
--- openmp/trunk/runtime/src/ompt-general.cpp
+++ openmp/trunk/runtime/src/ompt-general.cpp
@@ -430,10 +430,8 @@
#define ompt_event_macro(event_name, callback_type, event_id) \
case event_name: \
- if (ompt_event_implementation_status(event_name)) { \
- ompt_callbacks.ompt_callback(event_name) = (callback_type)callback; \
- ompt_enabled.event_name = (callback != 0); \
- } \
+ ompt_callbacks.ompt_callback(event_name) = (callback_type)callback; \
+ ompt_enabled.event_name = (callback != 0); \
if (callback) \
return ompt_event_implementation_status(event_name); \
else \
@@ -456,16 +454,15 @@
switch (which) {
#define ompt_event_macro(event_name, callback_type, event_id) \
- case event_name: \
- if (ompt_event_implementation_status(event_name)) { \
- ompt_callback_t mycb = \
- (ompt_callback_t)ompt_callbacks.ompt_callback(event_name); \
- if (ompt_enabled.event_name && mycb) { \
- *callback = mycb; \
- return ompt_get_callback_success; \
- } \
+ case event_name: { \
+ ompt_callback_t mycb = \
+ (ompt_callback_t)ompt_callbacks.ompt_callback(event_name); \
+ if (ompt_enabled.event_name && mycb) { \
+ *callback = mycb; \
+ return ompt_get_callback_success; \
} \
- return ompt_get_callback_failure;
+ return ompt_get_callback_failure; \
+ }
FOREACH_OMPT_EVENT(ompt_event_macro)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65869.215383.patch
Type: text/x-patch
Size: 4386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190815/d38ecb6e/attachment-0001.bin>
More information about the Openmp-commits
mailing list