]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: fix warning
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 27 Jan 2018 21:01:34 +0000 (22:01 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 27 Jan 2018 21:01:34 +0000 (22:01 +0100)
Making `special_profil_failure' both avoids warning "variable
'special_profil_failure' set but not used", and makes it easier to
access with gdb.

* sysdeps/mach/hurd/profil.c (special_profil_failure): Move variable
to global scope.

ChangeLog
sysdeps/mach/hurd/profil.c

index 5dd9e9fcb648d89f9d6fd53fa34c0be2a617c9c0..5e624156072b951b445efa5650c831ff74d12141 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,8 @@
        MACH_IPC_COMPAT.
        * sysdeps/mach/hurd/dl-sysdep.c (_exit): Call LOSE and abort() if
        __task_terminate would ever return successfully.
+       * sysdeps/mach/hurd/profil.c (special_profil_failure): Move variable
+       to global scope.
 
 2018-01-27  James Clarke  <jrtc27@jrtc27.com>
 
index 2fe8f9de56dfd7420aa37b563879d170ea39ba59..b3f201b016364c6f08d0f2cfb2d034900e05c51a 100644 (file)
@@ -138,6 +138,8 @@ __profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
 }
 weak_alias (__profil, profil)
 
+static volatile error_t special_profil_failure;
+
 /* Fetch PC samples.  This function must be very careful not to depend
    on Hurd threadvar variables.  We arrange that by using a special
    stub arranged for at the end of this file. */
@@ -154,7 +156,6 @@ fetch_samples (void)
                                     pc_samples, &nsamples);
   if (err)
     {
-      static volatile error_t special_profil_failure;
       static volatile int a, b;
 
       special_profil_failure = err;