tests: get rid of missing-field-initializers warning in test_bin_info.c
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 4 Oct 2019 18:39:09 +0000 (14:39 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 7 Oct 2019 18:37:30 +0000 (14:37 -0400)
This is not super important, and the current code looks correct, but
clang produces this warning:

    /home/smarchi/src/babeltrace/tests/plugins/flt.lttng-utils.debug-info/test_bin_info.c:93:7:
    error: missing field 'short_name' initializer
    [-Werror,-Wmissing-field-initializers]
            {NULL}};

I'd like to have this warning enabled, since it can catch some
legitimate mistakes, so I thought it would be useful to change the code
to avoid having a warning.

Change-Id: Icb5d3227b87ba1bbf405cd320f13886bf313492f
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2133
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/plugins/flt.lttng-utils.debug-info/test_bin_info.c

index fec4142dd46d3900444a5ce3889eb7e5c7d73168..5524342ce27091c38af1b411906dafb15bfcd8a6 100644 (file)
@@ -90,7 +90,7 @@ static GOptionEntry entries[] = {
         "XXXXXXXXXXXXXXX"},
        {"debug-info-dir", 0, 0, G_OPTION_ARG_STRING, &opt_debug_info_dir,
         "Debug info directory", NULL},
-       {NULL}};
+       {NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL}};
 
 static
 int build_id_to_bin(void)
This page took 0.027644 seconds and 4 git commands to generate.