Commit bb6f6faa authored by Kristian Høgsberg's avatar Kristian Høgsberg

scanner: Handle unrecognized invocation mode

Print usage if we don't recognize the invocation mode.  Also fixes
uninitialized variable warning.
parent 260d73b4
......@@ -1178,6 +1178,8 @@ int main(int argc, char *argv[])
mode = SERVER_HEADER;
else if (strcmp(argv[1], "code") == 0)
mode = CODE;
else
usage(EXIT_FAILURE);
wl_list_init(&protocol.interface_list);
protocol.type_index = 0;
......@@ -1210,7 +1212,7 @@ int main(int argc, char *argv[])
XML_ParserFree(ctx.parser);
switch(mode) {
switch (mode) {
case CLIENT_HEADER:
emit_header(&protocol, 0);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment