GNOME Bugzilla – Bug 734619
test/gkbd-keyboard-drawing-test.c: bail out when option parsing fails
Last modified: 2016-01-22 16:00:07 UTC
Created attachment 283106 [details] [review] test/gkbd-keyboard-drawing-test.c: bail out when option parsing fails gkbd-keyboard-drawing-test is quite useful, but it doesn't tell when some parsing command line options fails, let's fix this.
ping
Review of attachment 283106 [details] [review]: Thanks for your patch and sorry for the delay. ::: test/gkbd-keyboard-drawing-test.c @@ +176,3 @@ context = g_option_context_new ("kbdraw"); g_option_context_add_main_entries (context, options, NULL); + if (!g_option_context_parse(context, &argc, &argv, &error)) { Please add a space before opening parenthesis in a function call. @@ +177,3 @@ g_option_context_add_main_entries (context, options, NULL); + if (!g_option_context_parse(context, &argc, &argv, &error)) { + g_message("option parsing failed: %s", error->message); Ditto. @@ +179,3 @@ + g_message("option parsing failed: %s", error->message); + g_option_context_free (context); + exit(EXIT_FAILURE); Ditto.
Created attachment 319551 [details] [review] test/gkbd-keyboard-drawing-test.c: bail out when option parsing fails V2 Thanks for the review Michael. Please find attached a v2 of the patch which addresses your comments.