Skip to content

Commit 329d445

Browse files
committed
opal/hwloc: remove some unused variables when building with hwloc < 1.7
Refs #7362 Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
1 parent 907ad85 commit 329d445

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

opal/mca/hwloc/base/hwloc_base_util.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,9 +1388,10 @@ opal_hwloc_locality_t opal_hwloc_base_get_relative_locality(hwloc_topology_t top
13881388
*/
13891389
char* opal_hwloc_base_find_coprocessors(hwloc_topology_t topo)
13901390
{
1391+
#if HAVE_DECL_HWLOC_OBJ_OSDEV_COPROC
13911392
hwloc_obj_t osdev;
1392-
unsigned i;
13931393
char **cps = NULL;
1394+
#endif
13941395
char *cpstring = NULL;
13951396
int depth;
13961397

@@ -1408,6 +1409,7 @@ char* opal_hwloc_base_find_coprocessors(hwloc_topology_t topo)
14081409
while (NULL != osdev) {
14091410
if (HWLOC_OBJ_OSDEV_COPROC == osdev->attr->osdev.type) {
14101411
/* got one! find and save its serial number */
1412+
unsigned i;
14111413
for (i=0; i < osdev->infos_count; i++) {
14121414
if (0 == strncmp(osdev->infos[i].name, "MICSerialNumber", strlen("MICSerialNumber"))) {
14131415
OPAL_OUTPUT_VERBOSE((5, opal_hwloc_base_framework.framework_output,

0 commit comments

Comments
 (0)