]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virsh: Let the compiler check usage of all fields in vshCmdOptType enum
authorPeter Krempa <pkrempa@redhat.com>
Mon, 25 Mar 2013 11:03:30 +0000 (12:03 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 26 Mar 2013 08:12:26 +0000 (09:12 +0100)
Get rid of the "default" labels to do so.

tools/virsh.c

index b574d7e98e4d5bb8aa39f56110c54575a7e6732c..7ff12ec24f346aca4b346c00520927a8ccbdd8b5 100644 (file)
@@ -38,7 +38,6 @@
 #include <locale.h>
 #include <time.h>
 #include <limits.h>
-#include <assert.h>
 #include <sys/stat.h>
 #include <inttypes.h>
 #include <strings.h>
@@ -1172,8 +1171,6 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
                 case VSH_OT_ALIAS:
                     /* aliases are intentionally undocumented */
                     continue;
-                default:
-                    assert(0);
                 }
                 fputc(' ', stdout);
                 fprintf(stdout, fmt, opt->name);
@@ -1215,8 +1212,6 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
                     break;
                 case VSH_OT_ALIAS:
                     continue;
-                default:
-                    assert(0);
                 }
 
                 fprintf(stdout, "    %-15s  %s\n", buf, _(opt->help));