mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-08 05:34:36 -04:00
scanner: Handle unrecognized invocation mode
Print usage if we don't recognize the invocation mode. Also fixes uninitialized variable warning.
This commit is contained in:
parent
260d73b449
commit
bb6f6faaa2
1 changed files with 3 additions and 1 deletions
|
|
@ -1178,6 +1178,8 @@ int main(int argc, char *argv[])
|
||||||
mode = SERVER_HEADER;
|
mode = SERVER_HEADER;
|
||||||
else if (strcmp(argv[1], "code") == 0)
|
else if (strcmp(argv[1], "code") == 0)
|
||||||
mode = CODE;
|
mode = CODE;
|
||||||
|
else
|
||||||
|
usage(EXIT_FAILURE);
|
||||||
|
|
||||||
wl_list_init(&protocol.interface_list);
|
wl_list_init(&protocol.interface_list);
|
||||||
protocol.type_index = 0;
|
protocol.type_index = 0;
|
||||||
|
|
@ -1210,7 +1212,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
XML_ParserFree(ctx.parser);
|
XML_ParserFree(ctx.parser);
|
||||||
|
|
||||||
switch(mode) {
|
switch (mode) {
|
||||||
case CLIENT_HEADER:
|
case CLIENT_HEADER:
|
||||||
emit_header(&protocol, 0);
|
emit_header(&protocol, 0);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue