hurd: fix warning

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.
This commit is contained in:
Samuel Thibault 2018-01-27 22:01:34 +01:00
parent 06fac9f503
commit f817775364
2 changed files with 4 additions and 1 deletions

View File

@ -29,6 +29,8 @@
MACH_IPC_COMPAT. MACH_IPC_COMPAT.
* sysdeps/mach/hurd/dl-sysdep.c (_exit): Call LOSE and abort() if * sysdeps/mach/hurd/dl-sysdep.c (_exit): Call LOSE and abort() if
__task_terminate would ever return successfully. __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> 2018-01-27 James Clarke <jrtc27@jrtc27.com>

View File

@ -138,6 +138,8 @@ __profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
} }
weak_alias (__profil, profil) weak_alias (__profil, profil)
static volatile error_t special_profil_failure;
/* Fetch PC samples. This function must be very careful not to depend /* Fetch PC samples. This function must be very careful not to depend
on Hurd threadvar variables. We arrange that by using a special on Hurd threadvar variables. We arrange that by using a special
stub arranged for at the end of this file. */ stub arranged for at the end of this file. */
@ -154,7 +156,6 @@ fetch_samples (void)
pc_samples, &nsamples); pc_samples, &nsamples);
if (err) if (err)
{ {
static volatile error_t special_profil_failure;
static volatile int a, b; static volatile int a, b;
special_profil_failure = err; special_profil_failure = err;