diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2012-05-24 12:07:25 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2012-05-24 12:07:25 +0200 |
commit | 91ea36900f8363f6f94ed4c9dc7f07fbf19cad6a (patch) | |
tree | 8b9aad66a5f35bda84ee0bff2730f7454f4ec0fe /src/muniacli.cc | |
parent | 181210b62a721b300e7ffe64880e069a91575212 (diff) |
Fix crash on 'observe n' where n was not in the tree. Fix compile warnings.
Diffstat (limited to 'src/muniacli.cc')
-rw-r--r-- | src/muniacli.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/muniacli.cc b/src/muniacli.cc index 30e0ecf..f0e151d 100644 --- a/src/muniacli.cc +++ b/src/muniacli.cc @@ -88,7 +88,6 @@ static void pretty_print(std::string msgs) { MessageList list = parse_msg_client(msgs); std::string indent; - int prevtask = -1; std::list<int> childlist; @@ -251,7 +250,7 @@ static struct option options[] = { { NULL, 0, 0, 0 } }; -static char* USAGE= +static const char* USAGE= "Usage: muniacli [OPTION]... TASK COMMAND\n" "Commandline client to munia." "Options:\n" @@ -271,10 +270,7 @@ static char* USAGE= int main(int argc, char** argv) { int port = 7681; - struct libwebsocket_context *context; - int opts = 0; std::string host = "localhost"; - int optionscount = 0; std::string taskbyid; std::string taskbyname; cmd_t cmd = DEFAULT; @@ -355,6 +351,8 @@ int main(int argc, char** argv) case UPDATE: msgs = "update " + taskbyid + " " + cmd_opts; break; + case DEFAULT: + break; } /* |