diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-09 10:48:40 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-09 12:21:17 +0100 |
commit | 84a954686903b705eb0733a1bc02a7ac66728779 (patch) | |
tree | 7890094a2457c796f925baffa16f6a793fcab089 | |
parent | 5aae8de7760e321ad1fd6e88128379640df31c29 (diff) | |
download | lvm2-84a954686903b705eb0733a1bc02a7ac66728779.tar.gz |
dmsetup: cleanup warn for older compilers
Older gcc somehow thinks there is a path of using
subcommand uninitilized.
So make it more obvious there is no such one.
-rw-r--r-- | tools/dmsetup.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 15bff643e..bfba753af 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -6132,7 +6132,7 @@ int main(int argc, char **argv) int ret = 1, r; const char *dev_dir; const struct command *cmd; - const char *subcommand; + const char *subcommand = ""; int multiple_devices; (void) setlocale(LC_ALL, ""); @@ -6227,8 +6227,7 @@ unknown: if (cmd->has_subcommands) { subcommand = argv[0]; argc--, argv++; - } else - subcommand = ""; + } if (_switches[COLS_ARG] && !_report_init(cmd, subcommand)) goto_out; |