[PATCH 2/2] vshReadlineParse: Drop some unused variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My compiler identified some variables that were set, but never
actually used. For instance, opts_required, and data_acomplete.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tools/vsh.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index a7ce141..540c78c 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -2640,10 +2640,10 @@ vshReadlineParse(const char *text, int state)
     char *res = NULL;
     static char *ctext, *sanitized_text;
     static uint64_t const_opts_need_arg, const_opts_required, const_opts_seen;
-    uint64_t opts_need_arg, opts_required, opts_seen;
+    uint64_t opts_need_arg, opts_seen;
     size_t opt_index;
     static bool cmd_exists, opts_filled, opt_exists;
-    static bool non_bool_opt_exists, data_acomplete;
+    static bool non_bool_opt_exists;
 
     if (!state) {
         parser.pos = rl_line_buffer;
@@ -2687,7 +2687,6 @@ vshReadlineParse(const char *text, int state)
         cmd_exists = false;
         opts_filled = false;
         non_bool_opt_exists = false;
-        data_acomplete = false;
 
         const_opts_need_arg = 0;
         const_opts_required = 0;
@@ -2713,7 +2712,6 @@ vshReadlineParse(const char *text, int state)
                        c_isalnum(tkdata[2])) {
                 /* Command retrieved successfully, move to options */
                 opts_need_arg = const_opts_need_arg;
-                opts_required = const_opts_required;
                 opts_seen = const_opts_seen;
                 optstr = strchr(tkdata + 2, '=');
                 opt_index = 0;
@@ -2749,7 +2747,6 @@ vshReadlineParse(const char *text, int state)
                         tkdata = const_tkdata;
                         if (STREQ(tkdata, sanitized_text)) {
                             /* auto-complete non-bool option */
-                            data_acomplete = true;
                             break;
                         }
                     }
-- 
2.8.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux