From 2f3a76c569e5efad54520613315c0d29512ce69c Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 11 May 2011 12:34:13 -0700 Subject: Remove some variables which were set but not used. gcc (at least as of version 4.6.0) is kind enough to point these out to us, (when given -Wunused-but-set-variable explicitly or implicitly via -Wunused or -Wall). One of these cases was a legitimately unused variable. Two were simply variables (named ignored) we were assigning only to squelch a warning about unused function return values. I don't seem to be getting those warnings even without setting the ignored variable. And the gcc docs. say that the correct way to squelch that warning is with a cast to (void) anyway. --- notmuch-tag.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'notmuch-tag.c') diff --git a/notmuch-tag.c b/notmuch-tag.c index 60e21e0d..6204ae3c 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -25,10 +25,8 @@ static volatile sig_atomic_t interrupted; static void handle_sigint (unused (int sig)) { - ssize_t ignored; - static char msg[] = "Stopping... \n"; - ignored = write(2, msg, sizeof(msg)-1); + write(2, msg, sizeof(msg)-1); interrupted = 1; } -- cgit v1.2.3