diff --git a/openmp/runtime/cmake/LibompHandleFlags.cmake b/openmp/runtime/cmake/LibompHandleFlags.cmake --- a/openmp/runtime/cmake/LibompHandleFlags.cmake +++ b/openmp/runtime/cmake/LibompHandleFlags.cmake @@ -35,7 +35,7 @@ libomp_append(flags_local -Wno-stringop-truncation LIBOMP_HAVE_WNO_STRINGOP_TRUNCATION_FLAG) libomp_append(flags_local -Wno-switch LIBOMP_HAVE_WNO_SWITCH_FLAG) libomp_append(flags_local -Wno-uninitialized LIBOMP_HAVE_WNO_UNINITIALIZED_FLAG) - libomp_append(flags_local -Wno-unused-but-set-variable LIBOMP_HAVE_WNO_UNUSED_BUT_SET_VARIABLE_FLAG) + # libomp_append(flags_local -Wno-unused-but-set-variable LIBOMP_HAVE_WNO_UNUSED_BUT_SET_VARIABLE_FLAG) libomp_append(flags_local -Wno-return-type-c-linkage LIBOMP_HAVE_WNO_RETURN_TYPE_C_LINKAGE_FLAG) libomp_append(flags_local -Wno-cast-qual LIBOMP_HAVE_WNO_CAST_QUAL_FLAG) libomp_append(flags_local -Wno-int-to-void-pointer-cast LIBOMP_HAVE_WNO_INT_TO_VOID_POINTER_CAST_FLAG) diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp --- a/openmp/runtime/src/kmp_affinity.cpp +++ b/openmp/runtime/src/kmp_affinity.cpp @@ -2608,12 +2608,6 @@ nCoresPerPkg = maxCt[coreIdIndex]; nPackages = totals[pkgIdIndex]; - // Check to see if the machine topology is uniform - unsigned prod = totals[maxIndex]; - for (index = threadIdIndex; index < maxIndex; index++) { - prod *= maxCt[index]; - } - // When affinity is off, this routine will still be called to set // __kmp_ncores, as well as __kmp_nThreadsPerCore, nCoresPerPkg, & nPackages. // Make sure all these vars are set correctly, and return now if affinity is diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp --- a/openmp/runtime/src/kmp_csupport.cpp +++ b/openmp/runtime/src/kmp_csupport.cpp @@ -2519,12 +2519,6 @@ if (!codeptr) codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_lock_destroy) { - kmp_user_lock_p lck; - if (KMP_EXTRACT_D_TAG(user_lock) == 0) { - lck = ((kmp_indirect_lock_t *)KMP_LOOKUP_I_LOCK(user_lock))->lock; - } else { - lck = (kmp_user_lock_p)user_lock; - } ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } diff --git a/openmp/runtime/src/kmp_ftn_entry.h b/openmp/runtime/src/kmp_ftn_entry.h --- a/openmp/runtime/src/kmp_ftn_entry.h +++ b/openmp/runtime/src/kmp_ftn_entry.h @@ -128,12 +128,10 @@ return __kmps_get_blocktime(); #else int gtid, tid; - kmp_info_t *thread; kmp_team_p *team; gtid = __kmp_entry_gtid(); tid = __kmp_tid_from_gtid(gtid); - thread = __kmp_thread_from_gtid(gtid); team = __kmp_threads[gtid]->th.th_team; /* These must match the settings used in __kmp_wait_sleep() */ diff --git a/openmp/runtime/src/kmp_lock.cpp b/openmp/runtime/src/kmp_lock.cpp --- a/openmp/runtime/src/kmp_lock.cpp +++ b/openmp/runtime/src/kmp_lock.cpp @@ -1091,7 +1091,6 @@ volatile kmp_int32 *head_id_p = &lck->lk.head_id; volatile kmp_int32 *tail_id_p = &lck->lk.tail_id; volatile kmp_uint32 *spin_here_p; - kmp_int32 need_mf = 1; #if OMPT_SUPPORT ompt_state_t prev_state = ompt_state_undefined; @@ -1142,7 +1141,6 @@ if ( t > 0 ) condition in the enqueued case below, which is not necessary for this state transition */ - need_mf = 0; /* try (-1,0)->(tid,tid) */ enqueued = KMP_COMPARE_AND_STORE_ACQ64((volatile kmp_int64 *)tail_id_p, KMP_PACK_64(-1, 0), @@ -1164,7 +1162,6 @@ if (tail == 0) { enqueued = FALSE; } else { - need_mf = 0; /* try (h,t) or (h,h)->(h,tid) */ enqueued = KMP_COMPARE_AND_STORE_ACQ32(tail_id_p, tail, gtid + 1); diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp --- a/openmp/runtime/src/kmp_runtime.cpp +++ b/openmp/runtime/src/kmp_runtime.cpp @@ -1133,7 +1133,6 @@ #if OMPT_SUPPORT ompt_data_t ompt_parallel_data = ompt_data_none; - ompt_data_t *implicit_task_data; void *codeptr = OMPT_LOAD_RETURN_ADDRESS(global_tid); if (ompt_enabled.enabled && this_thr->th.ompt_thread_info.state != ompt_state_overhead) { @@ -1326,7 +1325,6 @@ // don't use lw_taskteam after linking. content was swaped /* OMPT implicit task begin */ - implicit_task_data = OMPT_CUR_TASK_DATA(this_thr); if (ompt_enabled.ompt_callback_implicit_task) { ompt_callbacks.ompt_callback(ompt_callback_implicit_task)( ompt_scope_begin, OMPT_CUR_TEAM_DATA(this_thr), diff --git a/openmp/runtime/src/kmp_wait_release.h b/openmp/runtime/src/kmp_wait_release.h --- a/openmp/runtime/src/kmp_wait_release.h +++ b/openmp/runtime/src/kmp_wait_release.h @@ -179,7 +179,6 @@ kmp_uint32 spins; int th_gtid; int tasks_completed = FALSE; - int oversubscribed; #if !KMP_USE_MONITOR kmp_uint64 poll_count; kmp_uint64 hibernate_goal; @@ -321,10 +320,10 @@ } else hibernate_goal = KMP_NOW() + this_thr->th.th_team_bt_intervals; poll_count = 0; + (void)poll_count; #endif // KMP_USE_MONITOR } - oversubscribed = (TCR_4(__kmp_nth) > __kmp_avail_proc); KMP_MB(); // Main wait spin loop diff --git a/openmp/runtime/src/z_Linux_util.cpp b/openmp/runtime/src/z_Linux_util.cpp --- a/openmp/runtime/src/z_Linux_util.cpp +++ b/openmp/runtime/src/z_Linux_util.cpp @@ -515,6 +515,7 @@ KMP_OS_OPENBSD if (__kmp_stkoffset > 0 && gtid > 0) { padding = KMP_ALLOCA(gtid * __kmp_stkoffset); + (void)padding; } #endif