From 2195e8af9af654a1fae79efaf36a014bef8f3d34 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 4 May 2011 15:17:51 +0100 Subject: [PATCH 1/6] bash completion helper: remove unused variable 'prev', and simplify gcc 4.6 warns about this. --- dbus/dbus-bash-completion-helper.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/dbus/dbus-bash-completion-helper.c b/dbus/dbus-bash-completion-helper.c index 50ca47a..ac79039 100644 --- a/dbus/dbus-bash-completion-helper.c +++ b/dbus/dbus-bash-completion-helper.c @@ -334,7 +334,6 @@ complete_dbus_send (char *str) char **tokens; int num_tokens; const char *cur; - const char *prev; gboolean have_system; gboolean have_session; gboolean have_print_reply; @@ -354,15 +353,10 @@ complete_dbus_send (char *str) tokens = g_strsplit (str, " ", 0); num_tokens = g_strv_length (tokens); - if (num_tokens >= 2) { + if (num_tokens >= 1) { cur = tokens[num_tokens - 1]; - prev = tokens[num_tokens - 2]; - } else if (num_tokens == 1) { - cur = tokens[num_tokens - 1]; - prev = ""; } else { cur = ""; - prev = ""; } have_system = have_option (tokens, "--system"); -- 1.7.5.1