From patchwork Fri Jan 9 18:16:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 427224 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 979AB140187 for ; Sat, 10 Jan 2015 05:17:42 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=X29537hglcMLz7Ki3x3pc5V1ci/lfiAMLLVyi1GOtnkDRjoZ4pCgP MH3I2CZEpu/Fnm/vOIBWAtOkpw3XkxAdp0q9VXw+RG9Zf+mrfxVryFJKW2YH9rlP 1sZnpQ0bGRLs/0RT8brOdJ9eyj7DCCF7nLRqMpSS5gy/ZHUJ9ZDGxM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=shA17JEx7/A2RyltmDzV+6ZeCOs=; b=HxiBMHV1Tjg1MJPLF9V5RloGfUEm Pmc/2Juxt082gaR2I9IRVrYcev/oLs40F/3NLvFVHAMkA2kMpQCzA9NeyULgBkT9 VuxWne0jV0Q7vOt6JFP+KbXemm5a7qfYbfRa3J47ZAvB1mAGG1EvOIfpl/NFND5t NF5SH909mH1vu44= Received: (qmail 4166 invoked by alias); 9 Jan 2015 18:17:37 -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 4141 invoked by uid 89); 9 Jan 2015 18:17:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS, SUBJ_ALL_CAPS autolearn=no version=3.3.2 X-HELO: mail-qg0-f44.google.com X-Received: by 10.229.178.67 with SMTP id bl3mr29301186qcb.18.1420827452443; Fri, 09 Jan 2015 10:17:32 -0800 (PST) From: Richard Henderson To: libc-alpha@sourceware.org Cc: roland@hack.frob.com Subject: [PATCH A1/1] Date: Fri, 9 Jan 2015 10:16:57 -0800 Message-Id: <1420827419-18655-1-git-send-email-rth@twiddle.net> This is a minimal patch to fix the current -Werrors resulting from the use of -DNDEBUG on x86_64. Rather than ifdef out the variables, as we have done elsewhere, it seemed less invasive to simply mark them as unused so that the compiler wouldn't warn. r~ * iconv/skeleton (FUNCTION_NAME): Mark nstatus unused. * nscd/nscd.c (do_exit): Mark ret unused. (notify_parent): Likewise. * sysdeps/nptl/gai_misc.h (__gai_start_notify_thread): Mark sigerr unused. (__gai_create_helper_thread): Likewise. --- iconv/skeleton.c | 2 +- nscd/nscd.c | 6 ++++-- sysdeps/nptl/gai_misc.h | 7 +++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/iconv/skeleton.c b/iconv/skeleton.c index 09dfe11..b1ef9ee 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -675,7 +675,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, #else /* We have a problem in one of the functions below. Undo the conversion upto the error point. */ - size_t nstatus; + size_t nstatus __attribute__((unused)); /* Reload the pointers. */ *inptrp = inptr; diff --git a/nscd/nscd.c b/nscd/nscd.c index 35b3a97..e73d071 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -659,7 +659,8 @@ do_exit (int child_ret, int errnum, const char *format, ...) { if (parent_fd != -1) { - int ret = write (parent_fd, &child_ret, sizeof (child_ret)); + int ret __attribute__((unused)); + ret = write (parent_fd, &child_ret, sizeof (child_ret)); assert (ret == sizeof (child_ret)); close (parent_fd); } @@ -691,7 +692,8 @@ notify_parent (int child_ret) if (parent_fd == -1) return; - int ret = write (parent_fd, &child_ret, sizeof (child_ret)); + int ret __attribute__((unused)); + ret = write (parent_fd, &child_ret, sizeof (child_ret)); assert (ret == sizeof (child_ret)); close (parent_fd); parent_fd = -1; diff --git a/sysdeps/nptl/gai_misc.h b/sysdeps/nptl/gai_misc.h index bb83dca..b952dc4 100644 --- a/sysdeps/nptl/gai_misc.h +++ b/sysdeps/nptl/gai_misc.h @@ -81,7 +81,8 @@ __gai_start_notify_thread (void) { sigset_t ss; sigemptyset (&ss); - int sigerr = pthread_sigmask (SIG_SETMASK, &ss, NULL); + int sigerr __attribute__((unused)); + sigerr = pthread_sigmask (SIG_SETMASK, &ss, NULL); assert_perror (sigerr); } @@ -105,7 +106,9 @@ __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), sigset_t ss; sigset_t oss; sigfillset (&ss); - int sigerr = pthread_sigmask (SIG_SETMASK, &ss, &oss); + int sigerr __attribute__((unused)); + + sigerr = pthread_sigmask (SIG_SETMASK, &ss, &oss); assert_perror (sigerr); int ret = pthread_create (threadp, &attr, tf, arg);