From 329d4451a6cdd544e532a29f594f6e5ee63e06da Mon Sep 17 00:00:00 2001 From: Brice Goglin Date: Tue, 4 Feb 2020 22:22:10 +0100 Subject: [PATCH] opal/hwloc: remove some unused variables when building with hwloc < 1.7 Refs #7362 Signed-off-by: Brice Goglin --- opal/mca/hwloc/base/hwloc_base_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opal/mca/hwloc/base/hwloc_base_util.c b/opal/mca/hwloc/base/hwloc_base_util.c index 993d2773e3..291a56e037 100644 --- a/opal/mca/hwloc/base/hwloc_base_util.c +++ b/opal/mca/hwloc/base/hwloc_base_util.c @@ -1388,9 +1388,10 @@ opal_hwloc_locality_t opal_hwloc_base_get_relative_locality(hwloc_topology_t top */ char* opal_hwloc_base_find_coprocessors(hwloc_topology_t topo) { +#if HAVE_DECL_HWLOC_OBJ_OSDEV_COPROC hwloc_obj_t osdev; - unsigned i; char **cps = NULL; +#endif char *cpstring = NULL; int depth; @@ -1408,6 +1409,7 @@ char* opal_hwloc_base_find_coprocessors(hwloc_topology_t topo) while (NULL != osdev) { if (HWLOC_OBJ_OSDEV_COPROC == osdev->attr->osdev.type) { /* got one! find and save its serial number */ + unsigned i; for (i=0; i < osdev->infos_count; i++) { if (0 == strncmp(osdev->infos[i].name, "MICSerialNumber", strlen("MICSerialNumber"))) { OPAL_OUTPUT_VERBOSE((5, opal_hwloc_base_framework.framework_output,