[Openmp-commits] [PATCH] D56775: [OpenMP] Remove compiler warning about unused value
Joachim Protze via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 16 01:56:51 PST 2019
protze.joachim created this revision.
protze.joachim added a reviewer: jlpeyton.
Herald added subscribers: openmp-commits, guansong.
The compiler warns about an unused variable/statement:
runtime/src/kmp_affinity.cpp:4958:18: warning: statement has no effect [-Wunused-value]
KA_TRACE(1000, ; {
^
runtime/src/kmp_debug.h:84:24: note: in definition of macro 'KA_TRACE'
__kmp_debug_printf x; \
^
Instead of the unused reference to this function, this patch now calls the function with an empty string.
As I understand the function, this should have no effect.
Repository:
rOMP OpenMP
https://reviews.llvm.org/D56775
Files:
runtime/src/kmp_affinity.cpp
Index: runtime/src/kmp_affinity.cpp
===================================================================
--- runtime/src/kmp_affinity.cpp
+++ runtime/src/kmp_affinity.cpp
@@ -4885,7 +4885,7 @@
}
gtid = __kmp_entry_gtid();
- KA_TRACE(1000, ; {
+ KA_TRACE(1000, (""); {
char buf[KMP_AFFIN_MASK_PRINT_LEN];
__kmp_affinity_print_mask(buf, KMP_AFFIN_MASK_PRINT_LEN,
(kmp_affin_mask_t *)(*mask));
@@ -4955,7 +4955,7 @@
th = __kmp_threads[gtid];
KMP_DEBUG_ASSERT(th->th.th_affin_mask != NULL);
- KA_TRACE(1000, ; {
+ KA_TRACE(1000, (""); {
char buf[KMP_AFFIN_MASK_PRINT_LEN];
__kmp_affinity_print_mask(buf, KMP_AFFIN_MASK_PRINT_LEN,
th->th.th_affin_mask);
@@ -4972,7 +4972,7 @@
#if !KMP_OS_WINDOWS
retval = __kmp_get_system_affinity((kmp_affin_mask_t *)(*mask), FALSE);
- KA_TRACE(1000, ; {
+ KA_TRACE(1000, (""); {
char buf[KMP_AFFIN_MASK_PRINT_LEN];
__kmp_affinity_print_mask(buf, KMP_AFFIN_MASK_PRINT_LEN,
(kmp_affin_mask_t *)(*mask));
@@ -5006,7 +5006,7 @@
return -1;
}
- KA_TRACE(1000, ; {
+ KA_TRACE(1000, (""); {
int gtid = __kmp_entry_gtid();
char buf[KMP_AFFIN_MASK_PRINT_LEN];
__kmp_affinity_print_mask(buf, KMP_AFFIN_MASK_PRINT_LEN,
@@ -5038,7 +5038,7 @@
return -1;
}
- KA_TRACE(1000, ; {
+ KA_TRACE(1000, (""); {
int gtid = __kmp_entry_gtid();
char buf[KMP_AFFIN_MASK_PRINT_LEN];
__kmp_affinity_print_mask(buf, KMP_AFFIN_MASK_PRINT_LEN,
@@ -5070,7 +5070,7 @@
return -1;
}
- KA_TRACE(1000, ; {
+ KA_TRACE(1000, (""); {
int gtid = __kmp_entry_gtid();
char buf[KMP_AFFIN_MASK_PRINT_LEN];
__kmp_affinity_print_mask(buf, KMP_AFFIN_MASK_PRINT_LEN,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56775.181996.patch
Type: text/x-patch
Size: 1778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190116/47997b08/attachment.bin>
More information about the Openmp-commits
mailing list