From patchwork Sat Jan 27 22:51:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 25625 Received: (qmail 4330 invoked by alias); 27 Jan 2018 22:51:09 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 4135 invoked by uid 89); 27 Jan 2018 22:51:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy= X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd,commited 5/7] hurd: fix warning Date: Sat, 27 Jan 2018 23:51:00 +0100 Message-Id: <20180127225102.11373-6-samuel.thibault@ens-lyon.org> In-Reply-To: <20180127225102.11373-1-samuel.thibault@ens-lyon.org> References: <20180127225102.11373-1-samuel.thibault@ens-lyon.org> 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 | 2 ++ sysdeps/mach/hurd/profil.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5dd9e9fcb6..5e62415607 100644 --- 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 diff --git a/sysdeps/mach/hurd/profil.c b/sysdeps/mach/hurd/profil.c index 2fe8f9de56..b3f201b016 100644 --- a/sysdeps/mach/hurd/profil.c +++ b/sysdeps/mach/hurd/profil.c @@ -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;