]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vsh: Fix warnings in command line completer
authorJiri Denemark <jdenemar@redhat.com>
Wed, 5 Oct 2016 07:19:19 +0000 (09:19 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 5 Oct 2016 15:26:47 +0000 (17:26 +0200)
commit7fe613af578a14cb0033ecfb3b5cc0d50a67a3fd
tree498d8b32c962ddc301b43a111beb24f801d58855
parent59539ebff3dd4a2f9fdb135d703afc14beb7962e
vsh: Fix warnings in command line completer

GCC complained that

vsh.c: In function 'vshReadlineOptionsGenerator':
vsh.c:2622:29: warning: unused variable 'opt' [-Wunused-variable]
         const vshCmdOptDef *opt = &cmd->opts[list_index];
                             ^
vsh.c: In function 'vshReadlineParse':
vsh.c:2830:44: warning: 'opt' may be used uninitialized in this function
[-Wmaybe-uninitialized]
             completed_list = opt->completer(autoCompleteOpaque,

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
tools/vsh.c