From patchwork Tue Feb 4 10:12:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mwanguhya Daniel Murungi X-Patchwork-Id: 316517 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 6965C2C0099 for ; Tue, 4 Feb 2014 21:15:18 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3F6EB8BD33; Tue, 4 Feb 2014 10:15:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BkIwXTuH2lOf; Tue, 4 Feb 2014 10:15:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id C330E8BD37; Tue, 4 Feb 2014 10:15:16 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 8B8191BF9DB for ; Tue, 4 Feb 2014 10:15:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 84BD131ECF for ; Tue, 4 Feb 2014 10:15:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RYaq4Y1TAoov for ; Tue, 4 Feb 2014 10:15:15 +0000 (UTC) X-Greylist: delayed 00:11:54 by SQLgrey-1.7.6 Received: from mailhost.wia.co.tz (imap.wia.co.tz [41.221.49.245]) by silver.osuosl.org (Postfix) with ESMTP id 354A431E87 for ; Tue, 4 Feb 2014 10:15:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mailhost.wia.co.tz (Postfix) with ESMTP id A9F9869230 for ; Tue, 4 Feb 2014 12:58:25 +0300 (EAT) X-Virus-Scanned: WIA SMTP Service Content Filter Received: from mailhost.wia.co.tz ([127.0.0.1]) by localhost (mailhost.wia.co.tz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RmlUy6BW8R9b for ; Tue, 4 Feb 2014 12:58:24 +0300 (EAT) Received: from devel.wia.co.tz (unknown [41.221.49.208]) by mailhost.wia.co.tz (Postfix) with ESMTP id 42A6D69165 for ; Tue, 4 Feb 2014 12:58:24 +0300 (EAT) From: Mwanguhya Daniel Murungi To: uclibc@uclibc.org Subject: [PATCH] Fix 'set but not used' warnings Date: Tue, 4 Feb 2014 13:12:06 +0300 Message-Id: <1391508726-10880-1-git-send-email-tuxmason@gmail.com> X-Mailer: git-send-email 1.7.12.1 X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: uclibc-bounces@uclibc.org Sender: uclibc-bounces@uclibc.org This patch uses 'attribute_unused' to clean up the following warnings related to unused variables. regex_internal.c:653:20: warning: variable 'buf' set but not used fts.c:580:6: warning: variable 'cderrno' set but not used Signed-off-by: Mwanguhya Daniel Murungi --- libc/misc/fts/fts.c | 2 +- libc/misc/regex/regex_internal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/misc/fts/fts.c b/libc/misc/fts/fts.c index 442dbf9..77a57b2 100644 --- a/libc/misc/fts/fts.c +++ b/libc/misc/fts/fts.c @@ -577,7 +577,7 @@ fts_build(register FTS *sp, int type) FTSENT *cur, *tail; DIR *dirp; void *oldaddr; - int cderrno, descend, len, level, nlinks, saved_errno, + int cderrno attribute_unused, descend, len, level, nlinks, saved_errno, nostat, doadjust; size_t maxlen; char *cp; diff --git a/libc/misc/regex/regex_internal.c b/libc/misc/regex/regex_internal.c index f9412d6..7c8be5b 100644 --- a/libc/misc/regex/regex_internal.c +++ b/libc/misc/regex/regex_internal.c @@ -650,7 +650,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) mbstate_t cur_state; wchar_t wc2; int mlen = raw + pstr->len - p; - unsigned char buf[6]; + unsigned char buf[6] attribute_unused; size_t mbclen; if (BE (pstr->trans != NULL, 0))