From 389954beec04f3019efa759ce92a4af85d24924e Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 28 Nov 2014 11:30:05 -0800 Subject: unposted: fix compiler set-but-not-used warning. --- ChangeLog | 4 ++++ Src/parse.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 593fe0190..7a9de40d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-11-28 Wayne Davison + + * unposted: avoid compiler warning about a set-but-not-used var. + 2014-11-28 Wayne Davison * 33139: Doc/Zsh/expn.yo: add example for finding broken symlinks. diff --git a/Src/parse.c b/Src/parse.c index 433efb94e..4ceeb4eaf 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -2590,7 +2590,7 @@ eccopyredirs(Estate s) { Wordcode pc = s->pc; wordcode code = *pc; - int ncode, ncodes = 0, r, type; + int ncode, ncodes = 0, r; if (wc_code(code) != WC_REDIR) return NULL; @@ -2598,7 +2598,9 @@ eccopyredirs(Estate s) init_parse(); while (wc_code(code) == WC_REDIR) { - type = WC_REDIR_TYPE(code); +#ifdef DEBUG + int type = WC_REDIR_TYPE(code); +#endif DPUTS(type == REDIR_HEREDOC || type == REDIR_HEREDOCDASH, "unexpanded here document"); -- cgit 1.4.1