diff options
| author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-08-09 22:04:30 +0000 |
|---|---|---|
| committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-08-09 22:04:30 +0000 |
| commit | baad3f6016b87cbd03578a1df6c6ea69280c4608 (patch) | |
| tree | 3e56c3fb3ee58e87ca95e731d4ed4ec9eec793c0 /openmp/runtime/src/thirdparty/ittnotify | |
| parent | 7da7b56830d94447e75479cbac71e5813496da38 (diff) | |
| download | bcm5719-llvm-baad3f6016b87cbd03578a1df6c6ea69280c4608.tar.gz bcm5719-llvm-baad3f6016b87cbd03578a1df6c6ea69280c4608.zip | |
[OpenMP] Cleanup code
This patch cleans up unused functions, variables, sign compare issues, and
addresses some -Warning flags which are now enabled including -Wcast-qual.
Not all the warning flags in LibompHandleFlags.cmake are enabled, but some
are with this patch.
Some __kmp_gtid_from_* macros in kmp.h are switched to static inline functions
which allows us to remove the awkward definition of KMP_DEBUG_ASSERT() and
KMP_ASSERT() macros which used the comma operator. This had to be done for the
innumerable -Wunused-value warnings related to KMP_DEBUG_ASSERT()
Differential Revision: https://reviews.llvm.org/D49105
llvm-svn: 339393
Diffstat (limited to 'openmp/runtime/src/thirdparty/ittnotify')
| -rw-r--r-- | openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c b/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c index ffc87caa726..16edbd150da 100644 --- a/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c +++ b/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c @@ -94,8 +94,6 @@ static const char* ittnotify_lib_name = "libittnotify.dylib"; __itt_mutex_lock(&p.mutex); \ } -const int _N_(err) = 0; - typedef int (__itt_init_ittlib_t)(const char*, __itt_group_id); /* this define used to control initialization function name. */ @@ -490,7 +488,7 @@ static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(const w static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_setW),_init))(const wchar_t* name, int namelen) { - namelen = namelen; + (void)namelen; ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(name); return 0; } @@ -538,14 +536,14 @@ static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(const ch #if ITT_PLATFORM==ITT_PLATFORM_WIN static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_setA),_init))(const char* name, int namelen) { - namelen = namelen; + (void)namelen; ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))(name); return 0; } #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_set),_init))(const char* name, int namelen) { - namelen = namelen; + (void)namelen; ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(name); return 0; } |

