[Openmp-commits] [openmp] r239331 - Remove unused variable warnings by moving variables.
Jonathan Peyton
jonathan.l.peyton at intel.com
Mon Jun 8 12:39:08 PDT 2015
Author: jlpeyton
Date: Mon Jun 8 14:39:07 2015
New Revision: 239331
URL: http://llvm.org/viewvc/llvm-project?rev=239331&view=rev
Log:
Remove unused variable warnings by moving variables.
As an ongoing effort to sanitize the openmp code, these changes move
variables under already existing macro guards.
Patch by Jack Howarth
Modified:
openmp/trunk/runtime/src/kmp_barrier.cpp
openmp/trunk/runtime/src/kmp_runtime.c
Modified: openmp/trunk/runtime/src/kmp_barrier.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_barrier.cpp?rev=239331&r1=239330&r2=239331&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_barrier.cpp (original)
+++ openmp/trunk/runtime/src/kmp_barrier.cpp Mon Jun 8 14:39:07 2015
@@ -1686,7 +1686,6 @@ void
__kmp_setup_icv_copy(kmp_team_t *team, int new_nproc, kmp_internal_control_t *new_icvs, ident_t *loc )
{
KMP_TIME_BLOCK(KMP_setup_icv_copy);
- int f;
KMP_DEBUG_ASSERT(team && new_nproc && new_icvs);
KMP_DEBUG_ASSERT((!TCR_4(__kmp_init_parallel)) || new_icvs->nproc);
@@ -1709,7 +1708,7 @@ __kmp_setup_icv_copy(kmp_team_t *team, i
// Copy the ICVs to each of the non-master threads. This takes O(nthreads) time.
ngo_load(new_icvs);
KMP_DEBUG_ASSERT(team->t.t_threads[0]); // The threads arrays should be allocated at this point
- for (f=1; f<new_nproc; ++f) { // Skip the master thread
+ for (int f=1; f<new_nproc; ++f) { // Skip the master thread
// TODO: GEH - pass in better source location info since usually NULL here
KF_TRACE(10, ("__kmp_setup_icv_copy: LINEAR: T#%d this_thread=%p team=%p\n",
f, team->t.t_threads[f], team));
Modified: openmp/trunk/runtime/src/kmp_runtime.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.c?rev=239331&r1=239330&r2=239331&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.c (original)
+++ openmp/trunk/runtime/src/kmp_runtime.c Mon Jun 8 14:39:07 2015
@@ -329,7 +329,6 @@ __kmp_infinite_loop( void )
void
__kmp_print_storage_map_gtid( int gtid, void *p1, void *p2, size_t size, char const *format, ...) {
char buffer[MAX_MESSAGE];
- int node;
va_list ap;
va_start( ap, format);
@@ -337,6 +336,7 @@ __kmp_print_storage_map_gtid( int gtid,
__kmp_acquire_bootstrap_lock( & __kmp_stdio_lock );
__kmp_vprintf( kmp_err, buffer, ap );
#if KMP_PRINT_DATA_PLACEMENT
+ int node;
if(gtid >= 0) {
if(p1 <= p2 && (char*)p2 - (char*)p1 == size) {
if( __kmp_storage_map_verbose ) {
@@ -7511,8 +7511,6 @@ __kmp_determine_reduction_method( ident_
int team_size;
- int teamsize_cutoff = 4;
-
KMP_DEBUG_ASSERT( loc ); // it would be nice to test ( loc != 0 )
KMP_DEBUG_ASSERT( lck ); // it would be nice to test ( lck != 0 )
@@ -7535,6 +7533,9 @@ __kmp_determine_reduction_method( ident_
#if KMP_ARCH_X86_64 || KMP_ARCH_PPC64 || KMP_ARCH_AARCH64
#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_WINDOWS || KMP_OS_DARWIN
+
+ int teamsize_cutoff = 4;
+
#if KMP_ARCH_X86_64 && (KMP_OS_LINUX || KMP_OS_WINDOWS)
if( __kmp_mic_type != non_mic ) {
teamsize_cutoff = 8;
More information about the Openmp-commits
mailing list