This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[hurd,commited 2/7] hurd: fix warning
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: libc-alpha at sourceware dot org
- Cc: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- Date: Sat, 27 Jan 2018 16:56:24 +0100
- Subject: [hurd,commited 2/7] hurd: fix warning
- Authentication-results: sourceware.org; auth=none
- References: <20180127155629.23644-1-samuel.thibault@ens-lyon.org>
* sysdeps/mach/hurd/profil.c: Reuse `a' variable instead of introducing
a `c' variable.
---
ChangeLog | 2 ++
sysdeps/mach/hurd/profil.c | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e6392de4e8..d923c6444f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
2018-01-27 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/mach/hurd/xmknodat.c: Include <sys/sysmacros.h>.
+ * sysdeps/mach/hurd/profil.c: Reuse `a' variable instead of introducing
+ a `c' variable.
2018-01-27 James Clarke <jrtc27@jrtc27.com>
diff --git a/sysdeps/mach/hurd/profil.c b/sysdeps/mach/hurd/profil.c
index 1323457acb..2fe8f9de56 100644
--- a/sysdeps/mach/hurd/profil.c
+++ b/sysdeps/mach/hurd/profil.c
@@ -154,14 +154,14 @@ fetch_samples (void)
pc_samples, &nsamples);
if (err)
{
- static error_t special_profil_failure;
- static volatile int a, b, c;
+ static volatile error_t special_profil_failure;
+ static volatile int a, b;
special_profil_failure = err;
a = 1;
b = 0;
while (1)
- c = a / b;
+ a = a / b;
}
for (i = 0; i < nsamples; ++i)
--
2.15.1