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

llvm-svn: 239331
This commit is contained in:
Jonathan Peyton 2015-06-08 19:39:07 +00:00
parent 2321d57f8b
commit 91b7870f42
2 changed files with 5 additions and 5 deletions

View File

@ -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, int new_nproc, kmp_internal_control_t *ne
// 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));

View File

@ -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, void *p1, void *p2, size_t size, char co
__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_t *loc, kmp_int32 global_tid,
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_t *loc, kmp_int32 global_tid,
#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;