Message ID | 1391508726-10880-1-git-send-email-tuxmason@gmail.com |
---|---|
State | Superseded, archived |
Headers | show |
On Tue, Feb 04, 2014 at 01:12:06PM +0300, Mwanguhya Daniel Murungi wrote: > 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 cderrno handling is dead code, i have commented out the stores, too. Thanks!
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))
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 <tuxmason@gmail.com> --- libc/misc/fts/fts.c | 2 +- libc/misc/regex/regex_internal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)