Skip to content

Commit

Permalink
utils/common-ps.c: reduce a variable scope
Browse files Browse the repository at this point in the history
to avoid a warning on !Linux

Refs #510

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Jan 3, 2022
1 parent 3e0de9e commit b04906d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/hwloc/common-ps.c
@@ -1,5 +1,5 @@
/*
* Copyright © 2009-2021 Inria. All rights reserved.
* Copyright © 2009-2022 Inria. All rights reserved.
* Copyright © 2009-2012 Université Bordeaux
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
Expand Down Expand Up @@ -31,7 +31,6 @@ int hwloc_ps_read_process(hwloc_topology_t topology, hwloc_const_bitmap_t topocp
hwloc_bitmap_t cpuset;
unsigned pathlen;
char *path;
char *end;
int fd;
ssize_t n;

Expand Down Expand Up @@ -143,6 +142,7 @@ int hwloc_ps_read_process(hwloc_topology_t topology, hwloc_const_bitmap_t topocp
if (taskdir) {
struct dirent *taskdirent;
long tid;
char *end;
unsigned nbth = 0;
/* count threads */
while ((taskdirent = readdir(taskdir))) {
Expand Down

0 comments on commit b04906d

Please sign in to comment.