mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -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;
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue