Skip to content

Commit 5219054

Browse files
authored
Merge pull request #3185 from jsquyres/pr/master/compiler-warning-squashes
Compiler warning squashes
2 parents 65d0372 + 760db0d commit 5219054

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

ompi/mca/osc/pt2pt/osc_pt2pt_frag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* reserved.
66
* Copyright (c) 2015 Research Organization for Information Science
77
* and Technology (RIST). All rights reserved.
8+
* Copyright (c) 2017 Cisco Systems, Inc. All rights reserved
89
* $COPYRIGHT$
910
*
1011
* Additional copyrights may follow
@@ -153,7 +154,6 @@ int ompi_osc_pt2pt_frag_flush_pending_all (ompi_osc_pt2pt_module_t *module)
153154
int ompi_osc_pt2pt_frag_flush_target (ompi_osc_pt2pt_module_t *module, int target)
154155
{
155156
ompi_osc_pt2pt_peer_t *peer = ompi_osc_pt2pt_peer_lookup (module, target);
156-
ompi_osc_pt2pt_frag_t *frag;
157157
int ret = OMPI_SUCCESS;
158158

159159
OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,

ompi/mca/topo/treematch/treematch/tm_kpartitioning.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ static int verbose_level = ERROR;
1515
#define MAX_TRIALS 10
1616
#define USE_KL_STRATEGY 1
1717

18-
18+
#if !defined(MIN)
1919
#define MIN(a,b) ((a)<(b)?(a):(b))
20+
#endif
2021

2122

2223
int fill_tab(int **,int *,int,int,int,int);

ompi/mca/topo/treematch/treematch/tm_tree.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@
1212
#include "tm_thread_pool.h"
1313

1414

15+
#if !defined(MIN)
1516
#define MIN(a,b) ((a)<(b)?(a):(b))
17+
#endif
18+
#if !defined(MAX)
1619
#define MAX(a,b) ((a)>(b)?(a):(b))
20+
#endif
1721

1822
#ifndef __CHARMC__
1923
#define __CHARMC__ 0

opal/mca/memory/patcher/memory_patcher_component.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2013-2017 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* Copyright (c) 2016 Research Organization for Information Science
@@ -59,6 +59,11 @@ static int patcher_query (int *);
5959

6060
static int mca_memory_patcher_priority;
6161

62+
/* NTH: we can't currently allow madvise to be intercepted due to a
63+
* deadlock when running with glibc. In the future, we may re-enable
64+
* this hook if the deadlock can be resolved. */
65+
#define WANT_INTERCEPT_MADVISE 0
66+
6267
opal_memory_patcher_component_t mca_memory_patcher_component = {
6368
.super = {
6469
.memoryc_version = {
@@ -244,6 +249,7 @@ static void *intercept_mremap (void *start, size_t oldlen, void *new_address, si
244249

245250
#endif
246251

252+
#if WANT_INTERCEPT_MADVISE
247253
#if defined (SYS_madvise)
248254

249255
static int (*original_madvise) (void *, size_t, int);
@@ -278,6 +284,7 @@ static int intercept_madvise (void *start, size_t length, int advice)
278284
}
279285

280286
#endif
287+
#endif // WANT_INTERCEPT_MADVISE
281288

282289
#if defined SYS_brk
283290

@@ -496,16 +503,14 @@ static int patcher_open (void)
496503
}
497504
#endif
498505

499-
/* NTH: we can't currently allow madvise to be intercepted due to a deadlock when running with glibc. in
500-
* the future we may re-enable this hook if the deadlock can be resolved. */
501-
#if 0
506+
#if WANT_INTERCEPT_MADVISE
502507
#if defined (SYS_madvise)
503508
rc = opal_patcher->patch_symbol ("madvise", (uintptr_t)intercept_madvise, (uintptr_t *) &original_madvise);
504509
if (OPAL_SUCCESS != rc) {
505510
return rc;
506511
}
507512
#endif
508-
#endif
513+
#endif // WANT_INTERCEPT_MADVISE
509514

510515
#if defined(SYS_shmdt) && defined(__linux__)
511516
rc = opal_patcher->patch_symbol ("shmdt", (uintptr_t) intercept_shmdt, (uintptr_t *) &original_shmdt);

0 commit comments

Comments
 (0)