From 91ea36900f8363f6f94ed4c9dc7f07fbf19cad6a Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 24 May 2012 12:07:25 +0200 Subject: Fix crash on 'observe n' where n was not in the tree. Fix compile warnings. --- src/muniacli.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/muniacli.cc') 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 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; } /* -- cgit v1.2.3