Prepare for '-Wmissing-field-initializers'
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 8 Mar 2022 23:05:26 +0000 (18:05 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 15 Mar 2022 21:00:34 +0000 (17:00 -0400)
In preparation for '-Wextra'

Change-Id: Ic593491ad44c1254f158b19659c3b9567d180ad1
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
44 files changed:
extras/bindings/swig/python/Makefile.am
src/bin/lttng-relayd/main.cpp
src/bin/lttng-sessiond/clear.cpp
src/bin/lttng-sessiond/cmd.cpp
src/bin/lttng-sessiond/consumer.cpp
src/bin/lttng-sessiond/dispatch.cpp
src/bin/lttng-sessiond/event-notifier-error-accounting.cpp
src/bin/lttng-sessiond/main.cpp
src/bin/lttng-sessiond/modprobe.cpp
src/bin/lttng-sessiond/notification-thread-events.cpp
src/bin/lttng-sessiond/sessiond-config.cpp
src/bin/lttng/commands/add_trigger.cpp
src/bin/lttng/commands/metadata.cpp
src/bin/lttng/commands/regenerate.cpp
src/bin/lttng/commands/snapshot.cpp
src/common/channel.cpp
src/common/conditions/session-rotation.cpp
src/common/config/session-config.cpp
src/common/consumer/consumer-timer.cpp
src/common/event.cpp
src/common/fd-tracker/fd-tracker.cpp
src/common/fd-tracker/inode.cpp
src/common/optional.h
src/common/payload-view.cpp
src/common/session-descriptor.cpp
src/common/sessiond-comm/sessiond-comm.cpp
src/common/trace-chunk.cpp
src/common/tracker.cpp
src/common/uri.cpp
src/lib/lttng-ctl/channel.cpp
src/lib/lttng-ctl/clear.cpp
src/lib/lttng-ctl/destruction-handle.cpp
src/lib/lttng-ctl/lttng-ctl.cpp
src/lib/lttng-ctl/tracker.cpp
tests/regression/kernel/select_poll_epoll.cpp
tests/regression/tools/trigger/hidden/hidden_trigger.cpp
tests/regression/ust/multi-lib/multi-lib-test.c
tests/utils/testapp/gen-ns-events/gen-ns-events.cpp
tests/utils/testapp/gen-ust-events-ns/Makefile.am
tests/utils/testapp/gen-ust-events/Makefile.am
tests/utils/testapp/gen-ust-nevents-str/Makefile.am
tests/utils/testapp/gen-ust-nevents/Makefile.am
tests/utils/testapp/gen-ust-tracef/Makefile.am
tests/utils/xml-utils/validate_xml.cpp

index 15dea077dedce8cb3f99b3c57aa5dc4b7132459f..8eea69f32ea637021e0d42f01a12af821dd20aee 100644 (file)
@@ -10,6 +10,8 @@ lttng.i: lttng.i.in
 # Disable -Wshadow for that file.
 AM_CFLAGS += -Wno-shadow
 
+AM_CFLAGS += -Wno-missing-field-initializers
+
 AM_CPPFLAGS += $(PYTHON_INCLUDE)
 
 EXTRA_DIST = lttng.i.in
index 99f7920103df184faf75075d7db9ce47979f6422..42eb09a897a1cc3f7d4fa285522efceca435dfe2 100644 (file)
@@ -2543,6 +2543,7 @@ static ssize_t relay_unpack_rotate_streams_header(
                        sizeof(rotate_streams.stream_count));
        rotate_streams = (typeof(rotate_streams)) {
                .stream_count = be32toh(rotate_streams.stream_count),
+               .new_chunk_id = LTTNG_OPTIONAL_INIT_UNSET,
        };
 
        /*
index 1239c5f2467a7db22537de7eb1f4fd751baefe0f..a0817c2daff618c90936cb48a2f0d51fe999b91e 100644 (file)
@@ -38,6 +38,7 @@ void cmd_clear_session_reply(const struct ltt_session *session,
                .pid = UINT32_MAX,
                .cmd_header_size = 0,
                .data_size = 0,
+               .fd_count = 0,
        };
 
        DBG("End of clear command: replying to client");
index 9ade60798692c112451e13f9b24d045e9a98a6cf..84254f1a57c936d75457433e540db4b368c454fc 100644 (file)
@@ -3287,6 +3287,7 @@ void cmd_destroy_session_reply(const struct ltt_session *session,
                .cmd_header_size =
                        sizeof(struct lttcomm_session_destroy_command_header),
                .data_size = 0,
+               .fd_count = 0,
        };
        size_t payload_size_before_location;
 
index 9919c678148978460438bc9e99cb287531e0a351..f76dffa7eb787e537e72b57637b1e4af0f94d462 100644 (file)
@@ -1731,6 +1731,7 @@ int consumer_open_channel_packets(struct consumer_socket *socket, uint64_t key)
        int ret;
        lttcomm_consumer_msg msg = {
                .cmd_type = LTTNG_CONSUMER_OPEN_CHANNEL_PACKETS,
+               .u = {},
        };
        msg.u.open_channel_packets.key = key;
 
@@ -1786,6 +1787,7 @@ int consumer_init(struct consumer_socket *socket,
        int ret;
        struct lttcomm_consumer_msg msg = {
                .cmd_type = LTTNG_CONSUMER_INIT,
+               .u = {},
        };
 
        LTTNG_ASSERT(socket);
@@ -1830,6 +1832,7 @@ int consumer_create_trace_chunk(struct consumer_socket *socket,
        enum lttng_trace_chunk_status tc_status;
        struct lttcomm_consumer_msg msg = {
                .cmd_type = LTTNG_CONSUMER_CREATE_TRACE_CHUNK,
+               .u = {},
        };
        msg.u.create_trace_chunk.session_id = session_id;
 
@@ -1984,6 +1987,7 @@ int consumer_close_trace_chunk(struct consumer_socket *socket,
        enum lttng_trace_chunk_status chunk_status;
        lttcomm_consumer_msg msg = {
                .cmd_type = LTTNG_CONSUMER_CLOSE_TRACE_CHUNK,
+               .u = {},
        };
        msg.u.close_trace_chunk.session_id = session_id;
 
@@ -2110,6 +2114,7 @@ int consumer_trace_chunk_exists(struct consumer_socket *socket,
        enum lttng_trace_chunk_status chunk_status;
        lttcomm_consumer_msg msg = {
                .cmd_type = LTTNG_CONSUMER_TRACE_CHUNK_EXISTS,
+               .u = {},
        };
        msg.u.trace_chunk_exists.session_id = session_id;
 
index 107e205c6f61a7fc49fbeb20275e9d506a7c008b..6cbb26126f8c080c3a66428f9c589b77e034b7b0 100644 (file)
@@ -231,6 +231,7 @@ static void *thread_dispatch_ust_registration(void *data)
        struct ust_reg_wait_node *wait_node = NULL, *tmp_wait_node;
        struct ust_reg_wait_queue wait_queue = {
                .count = 0,
+               .head = {},
        };
        struct thread_notifiers *notifiers = (thread_notifiers *) data;
 
index 49a54ff50ad28990fd19f1bac29b1c0830ed6868..2d2a2aa7590318ed1fe29967ae8ad933b6ed92b0 100644 (file)
@@ -981,6 +981,9 @@ event_notifier_error_accounting_register_kernel(
                                LTTNG_KERNEL_ABI_COUNTER_BITNESS_64,
                .number_dimensions = 1,
                .global_sum_step = 0,
+               .dimensions = {},
+               .coalesce_hits = 0,
+               .padding = {},
        };
        error_counter_conf.dimensions[0].size = kernel_state.number_indices;
        error_counter_conf.dimensions[0].has_underflow = false;
index 5873f03047e0c61c674bfc091a0482478d63391f..34e881c4d219aee6aea0d237982920fe0b2e4ba6 100644 (file)
@@ -1361,6 +1361,7 @@ static void unregister_all_triggers(void)
        unsigned int trigger_count, i;
        const struct lttng_credentials creds = {
                .uid = LTTNG_OPTIONAL_INIT_VALUE(0),
+               .gid = LTTNG_OPTIONAL_INIT_UNSET,
        };
 
        DBG("Unregistering all triggers");
index fb2bcc8aad8147077f4e3d9a13bc377fae633b8f..782dcc6b2714d334b0397cdee548abd0d83642a9 100644 (file)
@@ -30,38 +30,47 @@ struct kern_modules_param kern_modules_control_core[] = {
        {
                .name = (char *) "lttng-ring-buffer-client-discard",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-ring-buffer-client-overwrite",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-ring-buffer-metadata-client",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-ring-buffer-client-mmap-discard",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-ring-buffer-client-mmap-overwrite",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-ring-buffer-metadata-mmap-client",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-ring-buffer-event_notifier-client",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-counter-client-percpu-64-modular",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-counter-client-percpu-32-modular",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
 };
 
@@ -70,170 +79,212 @@ struct kern_modules_param kern_modules_probes_default[] = {
        {
                .name = (char *) "lttng-probe-asoc",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-block",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-btrfs",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-compaction",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-ext3",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-ext4",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-gpio",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-i2c",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-irq",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-jbd",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-jbd2",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-kmem",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-kvm",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-kvm-x86",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-kvm-x86-mmu",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-lock",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-module",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-napi",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-net",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-power",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-preemptirq",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-printk",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-random",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-rcu",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-regmap",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-regulator",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-rpm",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-sched",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-scsi",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-signal",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-skb",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-sock",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-statedump",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-sunrpc",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-timer",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-udp",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-vmscan",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-v4l2",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-workqueue",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-writeback",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-x86-irq-vectors",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
        {
                .name = (char *) "lttng-probe-x86-exceptions",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+               .loaded = false,
        },
 };
 
index f0140ce552356a258252f7b39b493fd8ec741f4e..9e1aa5300b8416e68fdc4672da8beedce66fc985 100644 (file)
@@ -1031,8 +1031,15 @@ int evaluate_condition_for_client(const struct lttng_trigger *trigger,
        struct lttng_evaluation *evaluation = NULL;
        struct notification_client_list client_list = {
                .lock = PTHREAD_MUTEX_INITIALIZER,
+               .ref = {},
+               .condition = NULL,
+               .triggers_list = {},
+               .clients_list = {},
+               .notification_trigger_clients_ht = NULL,
+               .notification_trigger_clients_ht_node = {},
+               .rcu_node = {},
        };
-       struct notification_client_list_element client_list_element = { 0 };
+       struct notification_client_list_element client_list_element = {};
        uid_t object_uid = 0;
        gid_t object_gid = 0;
 
@@ -2064,7 +2071,7 @@ int drain_event_notifier_notification_pipe(
                struct notification_thread_state *state,
                int pipe, enum lttng_domain_type domain)
 {
-       struct lttng_poll_event events = {0};
+       struct lttng_poll_event events = {};
        int ret;
 
        ret = lttng_poll_create(&events, 1, LTTNG_CLOEXEC);
@@ -3700,6 +3707,7 @@ int client_send_command_reply(struct notification_client *client,
        struct lttng_notification_channel_message msg = {
                .type = (int8_t) LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_COMMAND_REPLY,
                .size = sizeof(reply),
+               .fds = 0,
        };
        char buffer[sizeof(msg) + sizeof(reply)];
        enum client_transmission_status transmission_status;
@@ -3804,6 +3812,7 @@ int client_handle_message_handshake(struct notification_client *client,
        const struct lttng_notification_channel_message msg_header = {
                        .type = LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_HANDSHAKE,
                        .size = sizeof(handshake_reply),
+                       .fds = 0,
        };
        enum lttng_notification_channel_status status =
                        LTTNG_NOTIFICATION_CHANNEL_STATUS_OK;
@@ -4274,6 +4283,8 @@ int client_notification_overflow(struct notification_client *client)
        int ret = 0;
        const struct lttng_notification_channel_message msg = {
                .type = (int8_t) LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_NOTIFICATION_DROPPED,
+               .size = 0,
+               .fds = 0,
        };
 
        ASSERT_LOCKED(client->lock);
@@ -4378,6 +4389,8 @@ int notification_client_list_send_evaluation(
        };
        struct lttng_notification_channel_message msg_header = {
                .type = (int8_t) LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_NOTIFICATION,
+               .size = 0,
+               .fds = 0,
        };
        const struct lttng_credentials *trigger_creds =
                        lttng_trigger_get_credentials(trigger);
index c512b1ab15fd0178a695be6e531ecaff695b00dc..228d9c16b0f37be117be5f0abca0a9e8b6a0b62d 100644 (file)
@@ -35,37 +35,38 @@ struct sessiond_config sessiond_config_build_defaults = {
        .daemonize =                            false,
        .sig_parent =                           false,
 
-       .tracing_group_name = { (char *) DEFAULT_TRACING_GROUP },
-       .kmod_probes_list = { nullptr },
-       .kmod_extra_probes_list = { nullptr },
-
-       .rundir = { nullptr },
-
-       .apps_unix_sock_path = { nullptr },
-       .client_unix_sock_path = { nullptr },
-       .wait_shm_path = { nullptr },
-       .health_unix_sock_path = { nullptr },
-       .lttng_ust_clock_plugin = { nullptr },
-       .pid_file_path = { nullptr },
-       .lock_file_path = { nullptr },
-       .load_session_path = { nullptr },
-       .agent_port_file_path = { nullptr },
-
-       .consumerd32_path = { nullptr },
-       .consumerd32_bin_path = { nullptr },
-       .consumerd32_lib_dir = { nullptr },
-       .consumerd32_err_unix_sock_path = { nullptr },
-       .consumerd32_cmd_unix_sock_path = { nullptr },
-
-       .consumerd64_path = { nullptr },
-       .consumerd64_bin_path = { nullptr },
-       .consumerd64_lib_dir = { nullptr },
-       .consumerd64_err_unix_sock_path = { nullptr },
-       .consumerd64_cmd_unix_sock_path = { nullptr },
-
-       .kconsumerd_path = { nullptr },
-       .kconsumerd_err_unix_sock_path = { nullptr },
-       .kconsumerd_cmd_unix_sock_path = { nullptr },
+       .tracing_group_name = { (char *) DEFAULT_TRACING_GROUP, false },
+
+       .kmod_probes_list = { nullptr, false },
+       .kmod_extra_probes_list = { nullptr, false },
+
+       .rundir = { nullptr, false },
+
+       .apps_unix_sock_path = { nullptr, false },
+       .client_unix_sock_path = { nullptr, false },
+       .wait_shm_path = { nullptr, false },
+       .health_unix_sock_path = { nullptr, false },
+       .lttng_ust_clock_plugin = { nullptr, false },
+       .pid_file_path = { nullptr, false },
+       .lock_file_path = { nullptr, false },
+       .load_session_path = { nullptr, false },
+       .agent_port_file_path = { nullptr, false },
+
+       .consumerd32_path = { nullptr, false },
+       .consumerd32_bin_path = { nullptr, false },
+       .consumerd32_lib_dir = { nullptr, false },
+       .consumerd32_err_unix_sock_path = { nullptr, false },
+       .consumerd32_cmd_unix_sock_path = { nullptr, false },
+
+       .consumerd64_path = { nullptr, false },
+       .consumerd64_bin_path = { nullptr, false },
+       .consumerd64_lib_dir = { nullptr, false },
+       .consumerd64_err_unix_sock_path = { nullptr, false },
+       .consumerd64_cmd_unix_sock_path = { nullptr, false },
+
+       .kconsumerd_path = { nullptr, false },
+       .kconsumerd_err_unix_sock_path = { nullptr, false },
+       .kconsumerd_cmd_unix_sock_path = { nullptr, false },
 };
 
 static
index 85a75256472cc23c8e125679add23389f1719e98..82b2c016215ce714e789ca3dbbf5abd04249eb24 100644 (file)
@@ -659,7 +659,7 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv,
        int consumed_args = -1;
        struct lttng_kernel_probe_location *kernel_probe_location = NULL;
        struct lttng_userspace_probe_location *userspace_probe_location = NULL;
-       struct parse_event_rule_res res = { 0 };
+       struct parse_event_rule_res res = {};
        struct lttng_event_expr *event_expr = NULL;
        struct filter_parser_ctx *parser_ctx = NULL;
        struct lttng_log_level_rule *log_level_rule = NULL;
index b68c22a07cad3e766a2744f327901eaa7d12eb1b..8f4d8df632235c508cbdc3657f32bff7c28322d6 100644 (file)
@@ -41,7 +41,7 @@ static struct poptOption long_options[] = {
        { "help",               'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0, },
        { "session",            's', POPT_ARG_STRING, &opt_session_name, 0, 0, 0},
        { "list-options",       0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, 0, 0, },
-       { "list-commands",      0, POPT_ARG_NONE, NULL, OPT_LIST_COMMANDS},
+       { "list-commands",      0, POPT_ARG_NONE, NULL, OPT_LIST_COMMANDS, NULL, NULL},
        { 0, 0, 0, 0, 0, 0, 0, },
 };
 
index 4ceb55424073cb10aa70f6714c76ab693627bfb0..d25e883d54574a1ef947f8c6e7365c79237885a5 100644 (file)
@@ -42,7 +42,7 @@ static struct poptOption long_options[] = {
        { "help",               'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0, },
        { "session",            's', POPT_ARG_STRING, &opt_session_name, 0, 0, 0},
        { "list-options",       0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, 0, 0, },
-       { "list-commands",      0, POPT_ARG_NONE, NULL, OPT_LIST_COMMANDS},
+       { "list-commands",      0, POPT_ARG_NONE, NULL, OPT_LIST_COMMANDS, NULL, NULL},
        { 0, 0, 0, 0, 0, 0, 0, },
 };
 
index 4ae9ba1e91afb14e7b429532fdbda14df1799cc5..a5cbbfe759f5c16c25ea0a87bf8789a8e9627576 100644 (file)
@@ -60,7 +60,7 @@ static struct poptOption snapshot_opts[] = {
        {"name",         'n', POPT_ARG_STRING, &opt_output_name, 0, 0, 0},
        {"max-size",     'm', POPT_ARG_STRING, 0, OPT_MAX_SIZE, 0, 0},
        {"list-options",   0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL},
-       {"list-commands",  0, POPT_ARG_NONE, NULL, OPT_LIST_COMMANDS},
+       {"list-commands",  0, POPT_ARG_NONE, NULL, OPT_LIST_COMMANDS, NULL, NULL},
        {0, 0, 0, 0, 0, 0, 0}
 };
 
index db8d6fdec0c7130a738508c6a71f44a4b0e6bdbd..c0a0299a4d4a31302dbb08e977f2a01ea573b61b 100644 (file)
@@ -198,7 +198,7 @@ int lttng_channel_serialize(
 {
        int ret;
        size_t name_len;
-       struct lttng_channel_comm channel_comm = { 0 };
+       struct lttng_channel_comm channel_comm = {};
        struct lttng_channel_extended *extended;
 
        assert(channel);
index 7e59895f99812c9e28ff12e10f7382d0d782f6b1..390123a4ec59146680e08c44b7a2a8355d4a5bef 100644 (file)
@@ -520,7 +520,7 @@ int lttng_evaluation_session_rotation_serialize(
 {
        int ret;
        struct lttng_evaluation_session_rotation *rotation;
-       struct lttng_evaluation_session_rotation_comm comm = { 0 };
+       struct lttng_evaluation_session_rotation_comm comm = {};
 
        rotation = container_of(evaluation,
                        struct lttng_evaluation_session_rotation, parent);
index ef254d7ccea1d28bb8e64b348882a88a805b303d..143f8365e9baf6b59ceed4c87160b10e877c153d 100644 (file)
@@ -1203,7 +1203,7 @@ int create_snapshot_session(const char *session_name, xmlNodePtr output_node,
                        xmlNextElementSibling(snapshot_output_node)) {
                char *name = NULL;
                uint64_t max_size = UINT64_MAX;
-               struct consumer_output output = { 0 };
+               struct consumer_output output = {};
                struct lttng_snapshot_output *snapshot_output = NULL;
                const char *control_uri = NULL;
                const char *data_uri = NULL;
@@ -1329,7 +1329,7 @@ int create_session(const char *name,
        const struct config_load_session_override_attr *overrides)
 {
        int ret;
-       struct consumer_output output = { 0 };
+       struct consumer_output output = {};
        xmlNodePtr consumer_output_node;
        const char *control_uri = NULL;
        const char *data_uri = NULL;
@@ -3859,7 +3859,7 @@ int config_load_session(const char *path, const char *session_name,
        int ret;
        bool session_loaded = false;
        const char *path_ptr = NULL;
-       struct session_config_validation_ctx validation_ctx = { 0 };
+       struct session_config_validation_ctx validation_ctx = {};
 
        ret = init_session_config_validation_ctx(&validation_ctx);
        if (ret) {
index f6cb60c3b4e36912cc666709d29220e87fe1253a..51fa1687e9359a2d0c9a09e77b4573e8dce6e0ce 100644 (file)
@@ -648,6 +648,9 @@ void monitor_timer(struct lttng_consumer_channel *channel)
                        consumer_timer_thread_get_channel_monitor_pipe();
        struct lttcomm_consumer_channel_monitor_msg msg = {
                .key = channel->key,
+               .lowest = 0,
+               .highest = 0,
+               .total_consumed = 0,
        };
        sample_positions_cb sample;
        get_consumed_cb get_consumed;
index dda5eb7ba71176df9d0233d24742f58aed7e2908..ad3e23d4d8a15679977e7048ed6d6001ac0e3029 100644 (file)
@@ -77,7 +77,7 @@ static int lttng_event_probe_attr_serialize(
 {
        int ret;
        size_t symbol_name_len;
-       struct lttng_event_probe_attr_comm comm = { 0 };
+       struct lttng_event_probe_attr_comm comm = {};
 
        symbol_name_len = lttng_strnlen(probe->symbol_name, LTTNG_SYMBOL_NAME_LEN);
        if (symbol_name_len == LTTNG_SYMBOL_NAME_LEN) {
@@ -700,7 +700,7 @@ int lttng_event_serialize(const struct lttng_event *event,
        unsigned int i;
        size_t header_offset, size_before_payload;
        size_t name_len;
-       struct lttng_event_comm event_comm = { 0 };
+       struct lttng_event_comm event_comm = {};
        struct lttng_event_comm *header;
 
        assert(event);
@@ -1128,7 +1128,7 @@ static int lttng_event_context_app_serialize(
                struct lttng_payload *payload)
 {
        int ret;
-       struct lttng_event_context_app_comm comm = { 0 };
+       struct lttng_event_context_app_comm comm = {};
        size_t provider_len, ctx_len;
        const char *provider_name;
        const char *ctx_name;
@@ -1196,7 +1196,7 @@ static int lttng_event_context_perf_counter_serialize(
                struct lttng_payload *payload)
 {
        int ret;
-       struct lttng_event_context_perf_counter_comm comm = { 0 };
+       struct lttng_event_context_perf_counter_comm comm = {};
 
        assert(payload);
        assert(context);
@@ -1417,7 +1417,7 @@ int lttng_event_field_serialize(const struct lttng_event_field *field,
        int ret;
        size_t header_offset, size_before_event;
        size_t name_len;
-       struct lttng_event_field_comm event_field_comm = { 0 };
+       struct lttng_event_field_comm event_field_comm = {};
        struct lttng_event_field_comm *header;
 
        assert(field);
index e511d6901884cb7992f7da3b6020a1b8625c9b4d..18071dbd488b77f5a4331598438b5dfc705c7c28 100644 (file)
@@ -130,6 +130,8 @@ static struct {
        unsigned long value;
 } seed = {
        .lock = PTHREAD_MUTEX_INITIALIZER,
+       .initialized = false,
+       .value = 0,
 };
 
 static int match_fd(struct cds_lfht_node *node, const void *key);
index 404ba360b2ab40f8ee3d4c35bfd93d4622651c6e..74f7062484a9b7fa58a4e84e44a7b003ef411d1c 100644 (file)
@@ -66,6 +66,8 @@ static struct {
        unsigned long value;
 } seed = {
                .lock = PTHREAD_MUTEX_INITIALIZER,
+               .initialized = false,
+               .value = 0,
 };
 
 static unsigned long lttng_inode_id_hash(const struct inode_id *id)
index 52139d50de7198ac6524862554a4c9a4d892fa31..f34c5991fdfd4be070a1362d1968c4b3b88d2526 100644 (file)
@@ -83,7 +83,7 @@
  * The wrapped field is set to the value it would gave if it had static storage
  * duration.
  */
-#define LTTNG_OPTIONAL_INIT_UNSET { .is_set = 0 }
+#define LTTNG_OPTIONAL_INIT_UNSET {}
 
 /*
  * Initialize an optional field as 'set' with a given value.
index 3ea043c8aa0c7fb4a9051a890e020465f09d8636..f446acacfa2c22f744a4be7b49db94b5d548c330 100644 (file)
@@ -24,9 +24,11 @@ struct lttng_payload_view lttng_payload_view_from_payload(
                .buffer = lttng_buffer_view_from_dynamic_buffer(
                        &payload->buffer, offset, len),
                ._fd_handles = payload->_fd_handles,
+               ._iterator = {},
        } : (struct lttng_payload_view) {
                .buffer = {},
-               ._fd_handles = {}
+               ._fd_handles = {},
+               ._iterator = {},
        };
 }
 
@@ -41,10 +43,12 @@ struct lttng_payload_view lttng_payload_view_from_view(
                ._iterator = {
                        .p_fd_handles_position = view->_iterator.p_fd_handles_position ?:
                                &view->_iterator.fd_handles_position,
+                       .fd_handles_position = 0,
                }
        } : (struct lttng_payload_view) {
                .buffer = {},
-               ._fd_handles = {}
+               ._fd_handles = {},
+               ._iterator = {},
        };
 }
 
@@ -55,10 +59,12 @@ struct lttng_payload_view lttng_payload_view_from_dynamic_buffer(
        return buffer ? (struct lttng_payload_view) {
                .buffer = lttng_buffer_view_from_dynamic_buffer(
                        buffer, offset, len),
-               ._fd_handles = {}
+               ._fd_handles = {},
+               ._iterator = {},
        } : (struct lttng_payload_view) {
                .buffer = {},
-               ._fd_handles = {}
+               ._fd_handles = {},
+               ._iterator = {},
        };
 }
 
@@ -69,10 +75,12 @@ struct lttng_payload_view lttng_payload_view_from_buffer_view(
        return view ? (struct lttng_payload_view) {
                .buffer = lttng_buffer_view_from_view(
                        view, offset, len),
-               ._fd_handles = {}
+               ._fd_handles = {},
+               ._iterator = {},
        } : (struct lttng_payload_view) {
                .buffer = {},
-               ._fd_handles = {}
+               ._fd_handles = {},
+               ._iterator = {},
        };
 }
 
@@ -82,7 +90,8 @@ struct lttng_payload_view lttng_payload_view_init_from_buffer(
        return (struct lttng_payload_view) {
                .buffer = lttng_buffer_view_init(
                        src, offset, len),
-               ._fd_handles = {}
+               ._fd_handles = {},
+               ._iterator = {},
        };
 }
 
index 36b6fc4eb073de81b99d17b619a04d238b220be1..e8a602121351b6034aa8846bf877be6945f76655 100644 (file)
@@ -816,7 +816,10 @@ int lttng_session_descriptor_serialize(
                        .output_type = (uint8_t) descriptor->output_type,
                        .name_len = (uint32_t) (descriptor->name ?
                                strlen(descriptor->name) + 1 : 0),
-               }
+                       .uri_count = 0,
+               },
+               .live_timer_us = 0,
+
        };
        const void *header_ptr = NULL;
        size_t header_size;
index 24db516376c5904bae9c5586cab75aba74cf08c2..9be0cbcac8d07be1ee25f2a5dd7882243fdedc1e 100644 (file)
@@ -524,7 +524,7 @@ int lttcomm_populate_sock_from_open_socket(
 {
        int ret = 0;
        socklen_t storage_len;
-       struct sockaddr_storage storage = { 0 };
+       struct sockaddr_storage storage = {};
 
        assert(sock);
        assert(fd >= 0);
index 3ae804781021ae97595203d922dc9ffc18ec0961..92cbd3c342d6daac671033b49c0262517fd2d28b 100644 (file)
@@ -1007,6 +1007,7 @@ enum lttng_trace_chunk_status lttng_trace_chunk_set_credentials_current_user(
        enum lttng_trace_chunk_status status = LTTNG_TRACE_CHUNK_STATUS_OK;
        const struct chunk_credentials credentials = {
                .use_current_user = true,
+               .user = {},
        };
 
        pthread_mutex_lock(&chunk->lock);
index c5efaa3198b6aa5cfaea5c038e491ccfee92cc89..0cd0e9027973f18e27e3ca238046b1cdd02bf5af 100644 (file)
@@ -247,6 +247,7 @@ int process_attr_tracker_value_serialize(const struct process_attr_value *value,
        int ret;
        struct process_attr_tracker_value_comm value_comm = {
                        .type = (int32_t) value->type,
+                       .value = {},
        };
        const char *name = NULL;
 
index 98ff2b471b0d87b3c9f3ae4dea8c449e83ae291e..393eba81594aefd3087b1577b6660d4cdb0b2511 100644 (file)
@@ -43,7 +43,7 @@ static const struct uri_proto proto_uri[] = {
        { .name = "tcp4", .leading_string = "tcp4://", .code = P_TCP, .type = LTTNG_TCP, .dtype = LTTNG_DST_IPV4 },
        { .name = "tcp6", .leading_string = "tcp6://", .code = P_TCP6, .type = LTTNG_TCP, .dtype = LTTNG_DST_IPV6 },
        /* Invalid proto marking the end of the array. */
-       { 0 }
+       {}
 };
 
 /*
index e7b044ac05aafad89f3ff9af02e611619b8b8b3c..f464e7000573ac0381b366b51a50b660845f61c5 100644 (file)
@@ -575,6 +575,7 @@ int handshake(struct lttng_notification_channel *channel)
        struct lttng_notification_channel_message msg_header = {
                .type = LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_HANDSHAKE,
                .size = sizeof(handshake),
+               .fds = 0,
        };
        char send_buffer[sizeof(msg_header) + sizeof(handshake)];
 
@@ -623,6 +624,8 @@ enum lttng_notification_channel_status send_condition_command(
        struct lttng_payload payload;
        struct lttng_notification_channel_message cmd_header = {
                .type = (int8_t) type,
+               .size =0,
+               .fds = 0,
        };
 
        lttng_payload_init(&payload);
index 0eaf97364ce9c14f8c02fdd4b48e945b7d1ab81b..fb2b1cae951e2cf3c06f1bdd0d8990554f61ea24 100644 (file)
@@ -283,6 +283,10 @@ enum lttng_error_code lttng_clear_session(const char *session_name,
        struct lttng_clear_handle *handle = NULL;
        struct lttcomm_session_msg lsm = {
                .cmd_type = LTTNG_CLEAR_SESSION,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
        };
        int sessiond_socket = -1;
        ssize_t comm_ret;
index 35a1c358225376de7c7a3fa5de1614a93e8c9312..0bfa303d804392107b612893cf50117a88c13bb6 100644 (file)
@@ -391,6 +391,10 @@ enum lttng_error_code lttng_destroy_session_ext(const char *session_name,
        enum lttng_error_code ret_code = LTTNG_OK;
        struct lttcomm_session_msg lsm = {
                .cmd_type = LTTNG_DESTROY_SESSION,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
        };
        int sessiond_socket = -1;
        struct lttng_destruction_handle *handle = NULL;
index 0da8f6ad100eef2217254382c9c7e1651aa339eb..68f8c1f7e01916c51c7299e6e660832aba029391 100644 (file)
@@ -916,7 +916,13 @@ int lttng_add_context(struct lttng_handle *handle,
                const char *channel_name)
 {
        int ret;
-       struct lttcomm_session_msg lsm = { .cmd_type = LTTNG_ADD_CONTEXT };
+       struct lttcomm_session_msg lsm = {
+               .cmd_type = LTTNG_ADD_CONTEXT,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
+       };
        struct lttng_payload payload;
 
        lttng_payload_init(&payload);
@@ -1084,7 +1090,13 @@ int lttng_enable_event_with_exclusions(struct lttng_handle *handle,
                const char *original_filter_expression,
                int exclusion_count, char **exclusion_list)
 {
-       struct lttcomm_session_msg lsm = { .cmd_type = LTTNG_ENABLE_EVENT };
+       struct lttcomm_session_msg lsm = {
+               .cmd_type = LTTNG_ENABLE_EVENT,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
+       };
        struct lttng_payload payload;
        int ret = 0;
        unsigned int free_filter_expression = 0;
@@ -1263,7 +1275,13 @@ int lttng_disable_event_ext(struct lttng_handle *handle,
                struct lttng_event *ev, const char *channel_name,
                const char *original_filter_expression)
 {
-       struct lttcomm_session_msg lsm = { .cmd_type = LTTNG_DISABLE_EVENT };
+       struct lttcomm_session_msg lsm = {
+               .cmd_type = LTTNG_DISABLE_EVENT,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
+       };
        struct lttng_payload payload;
        int ret = 0;
        unsigned int free_filter_expression = 0;
@@ -1650,7 +1668,13 @@ int lttng_list_tracepoints(struct lttng_handle *handle,
         enum lttng_error_code ret_code;
         int ret, total_payload_received;
         char *reception_buffer = NULL;
-        struct lttcomm_session_msg lsm = { .cmd_type = LTTNG_LIST_TRACEPOINTS };
+        struct lttcomm_session_msg lsm = {
+               .cmd_type = LTTNG_LIST_TRACEPOINTS,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
+       };
         struct lttcomm_list_command_header *cmd_header = NULL;
         size_t cmd_header_len;
         unsigned int nb_events = 0;
@@ -1875,6 +1899,10 @@ enum lttng_error_code lttng_create_session_ext(
        enum lttng_error_code ret_code;
        struct lttcomm_session_msg lsm = {
                .cmd_type = LTTNG_CREATE_SESSION_EXT,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
        };
        void *reply = NULL;
        struct lttng_buffer_view reply_view;
@@ -2983,6 +3011,10 @@ int _lttng_register_trigger(struct lttng_trigger *trigger, const char *name,
        int ret;
        struct lttcomm_session_msg lsm = {
                .cmd_type = LTTNG_REGISTER_TRIGGER,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
        };
        lsm.u.trigger.is_trigger_anonymous = !name && !generate_name;
        struct lttcomm_session_msg *message_lsm;
@@ -3155,6 +3187,10 @@ enum lttng_error_code lttng_error_query_execute(
        enum lttng_error_code ret_code;
        struct lttcomm_session_msg lsm = {
                .cmd_type = LTTNG_EXECUTE_ERROR_QUERY,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
        };
        struct lttng_payload message;
        struct lttng_payload reply;
@@ -3339,7 +3375,13 @@ enum lttng_error_code lttng_list_triggers(struct lttng_triggers **triggers)
 {
        int ret;
        enum lttng_error_code ret_code = LTTNG_OK;
-       struct lttcomm_session_msg lsm = { .cmd_type = LTTNG_LIST_TRIGGERS };
+       struct lttcomm_session_msg lsm = {
+               .cmd_type = LTTNG_LIST_TRIGGERS,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
+       };
        struct lttng_triggers *local_triggers = NULL;
        struct lttng_payload reply;
        struct lttng_payload_view lsm_view =
index 40af23cd1214008ed0d11f3798fac905a0cbb2b9..b7fc1f78a0f794976022bb29ab1c37b1fef3689e 100644 (file)
@@ -102,7 +102,11 @@ lttng_process_attr_tracker_handle_get_tracking_policy(
        enum lttng_process_attr_tracker_handle_status status =
                        LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK;
        struct lttcomm_session_msg lsm = {
-                       .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_GET_POLICY,
+               .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_GET_POLICY,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
        };
 
        if (!tracker || !policy) {
@@ -149,7 +153,11 @@ lttng_process_attr_tracker_handle_set_tracking_policy(
        enum lttng_process_attr_tracker_handle_status status =
                        LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK;
        struct lttcomm_session_msg lsm = {
-                       .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_SET_POLICY,
+               .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_SET_POLICY,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
        };
 
        if (!tracker) {
@@ -197,7 +205,12 @@ end:
                enum lttng_process_attr_tracker_handle_status status =                                               \
                                LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK;                                         \
                struct lttcomm_session_msg lsm = {                                                                   \
-                               .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_##command_upper##_INCLUDE_VALUE};             \
+                       .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_##command_upper##_INCLUDE_VALUE,                      \
+                       .session = {},                                                                               \
+                       .domain = {},                                                                                \
+                       .u = {},                                                                                     \
+                       .fd_count = 0,                                                                               \
+               };                                                                                                   \
                                                                                                                      \
                if (!tracker) {                                                                                      \
                        status = LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_INVALID;                                   \
@@ -260,7 +273,12 @@ end:
                enum lttng_process_attr_tracker_handle_status status =                                               \
                                LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK;                                         \
                struct lttcomm_session_msg lsm = {                                                                   \
-                               .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_##command_upper##_INCLUDE_VALUE};             \
+                       .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_##command_upper##_INCLUDE_VALUE,                      \
+                       .session = {},                                                                               \
+                       .domain = {},                                                                                \
+                       .u = {},                                                                                     \
+                       .fd_count = 0,                                                                               \
+               };                                                                                                   \
                const size_t len = value ? strlen(value) + 1 : 0;                                                    \
                                                                                                                      \
                if (!tracker || !value) {                                                                            \
@@ -374,7 +392,11 @@ lttng_process_attr_tracker_handle_get_inclusion_set(
        enum lttng_process_attr_tracker_handle_status status =
                        LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK;
        struct lttcomm_session_msg lsm = {
-                       .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET,
+               .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET,
+               .session = {},
+               .domain = {},
+               .u = {},
+               .fd_count = 0,
        };
        struct lttng_buffer_view inclusion_set_view;
        ssize_t inclusion_set_ret;
index fb72f6e5a582c48899752acbeeb3bd20966ccc39..d3a21e2fcc392fe5bedb4f5b06dc56b9b393bf1d 100644 (file)
@@ -66,15 +66,15 @@ static const struct test_case {
 {
        { .run = run_working_cases, .produces_validation_info = true, .timeout = -1 },
        { .run = run_working_cases, .produces_validation_info = true, .timeout = 1 },
-       { .run = pselect_invalid_fd, .produces_validation_info = false },
-       { .run = test_ppoll_big, .produces_validation_info = false },
-       { .run = ppoll_fds_buffer_overflow, .produces_validation_info = false },
-       { .run = pselect_invalid_pointer, .produces_validation_info = false },
-       { .run = ppoll_fds_ulong_max, .produces_validation_info = false },
-       { .run = epoll_pwait_invalid_pointer, .produces_validation_info = true },
-       { .run = epoll_pwait_int_max, .produces_validation_info = true },
-       { .run = ppoll_concurrent_write, .produces_validation_info = false },
-       { .run = epoll_pwait_concurrent_munmap, .produces_validation_info = true },
+       { .run = pselect_invalid_fd, .produces_validation_info = false, .timeout = 0 },
+       { .run = test_ppoll_big, .produces_validation_info = false, .timeout = 0 },
+       { .run = ppoll_fds_buffer_overflow, .produces_validation_info = false, .timeout = 0 },
+       { .run = pselect_invalid_pointer, .produces_validation_info = false, .timeout = 0 },
+       { .run = ppoll_fds_ulong_max, .produces_validation_info = false, .timeout = 0 },
+       { .run = epoll_pwait_invalid_pointer, .produces_validation_info = true, .timeout = 0 },
+       { .run = epoll_pwait_int_max, .produces_validation_info = true, .timeout = 0 },
+       { .run = ppoll_concurrent_write, .produces_validation_info = false, .timeout = 0 },
+       { .run = epoll_pwait_concurrent_munmap, .produces_validation_info = true, .timeout = 0 },
 };
 
 struct ppoll_thread_data {
@@ -935,7 +935,7 @@ int main(int argc, const char **argv)
                { "validation-file", 'o', POPT_ARG_STRING, &test_validation_output_file_path, 0,
                        "Test case output", NULL },
                POPT_AUTOHELP
-               { NULL, 0, 0, NULL, 0 }
+               { NULL, 0, 0, NULL, 0, NULL, NULL }
        };
        const struct test_case *test_case;
 
index 668a60fb3fd97be3f304c9bd72c09569ab5af449..62c8f5dd06300225448ba499684c97b7e7dc6157 100644 (file)
@@ -66,7 +66,10 @@ int setup_session_with_size_rotation_schedule(const char *session_output_path)
                {
                        .type = LTTNG_DOMAIN_UST,
                        .buf_type = LTTNG_BUFFER_PER_UID,
-               }
+                       .padding = {},
+                       .attr = {},
+               },
+               {}
        };
 
        lttng_channel channel_cfg {};
index 6bec733ff555d9a501b773b9f439278a777cd8af..eb14162489ff07d924d25d0b8ae604206ce08ea0 100644 (file)
@@ -178,7 +178,7 @@ int main(int argc, const char **argv)
                        { "test", 't', POPT_ARG_INT, &test, 0, "Test to run", NULL },
                        { "list", 'l', 0, 0, 'l', "List of tests (-t X)", NULL },
                        POPT_AUTOHELP
-                       { NULL, 0, 0, NULL, 0 }
+                       { NULL, 0, 0, NULL, 0, NULL, NULL }
        };
 
        optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
index 78b962d19bb71a0e214fcd6a0f4ec41511eb73f1..6afd855da1d0c986e2bbdc6e7e07b721e653b07f 100644 (file)
@@ -72,7 +72,7 @@ static struct poptOption opts[] = {
        { "after", 'a', POPT_ARG_STRING, &after_unshare_wait_file_path, 0, "Wait for file after unshare", NULL },
        { "signal", 's', POPT_ARG_STRING, &after_unshare_signal_file_path, 0, "Create signal file after unshare", NULL },
        POPT_AUTOHELP
-       { NULL, 0, 0, NULL, 0 }
+       { NULL, 0, 0, NULL, 0, NULL, NULL }
 };
 
 static ATTR_FORMAT_PRINTF(1, 2)
index 37bdc94fe786f3c7bfb2e1420e40ea1377b563ca..22242fb92209455ae4a49b48d1d2c41751e6c370 100644 (file)
@@ -6,7 +6,8 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -I$(srcdir) \
 if HAVE_LIBLTTNG_UST_CTL
 # Disable some warnings flags to accomodate the tracepoint headers
 WARN_FLAGS = \
-       -Wno-redundant-decls
+       -Wno-redundant-decls \
+       -Wno-missing-field-initializers
 
 AM_CFLAGS += $(WARN_FLAGS)
 AM_CXXFLAGS += $(WARN_FLAGS)
index 1e89ddd67b0d8d72e47917f68a34bb2bcbea1404..27896e13665af420e83dadb68ad131164812ef1b 100644 (file)
@@ -6,7 +6,8 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -I$(srcdir) \
 if HAVE_LIBLTTNG_UST_CTL
 # Disable some warnings flags to accomodate the tracepoint headers
 WARN_FLAGS = \
-       -Wno-redundant-decls
+       -Wno-redundant-decls \
+       -Wno-missing-field-initializers
 
 AM_CFLAGS += $(WARN_FLAGS)
 AM_CXXFLAGS += $(WARN_FLAGS)
index 75c50bb1e2ee62bcd0b9f54aa95b063a9fe4eaee..e3a6e5cd0fee9a233378632eb172a9fe5ed45b9e 100644 (file)
@@ -5,7 +5,8 @@ AM_CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/tests/utils \
 
 if HAVE_LIBLTTNG_UST_CTL
 WARN_FLAGS = \
-       -Wno-redundant-decls
+       -Wno-redundant-decls \
+       -Wno-missing-field-initializers
 
 AM_CFLAGS += $(WARN_FLAGS)
 AM_CXXFLAGS += $(WARN_FLAGS)
index c2d36d7c951c370fe13ffc6d9a1eb518a9ac790a..746ffc688cee6d3593bbf9701f3564b493716544 100644 (file)
@@ -5,7 +5,8 @@ AM_CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/tests/utils \
 
 if HAVE_LIBLTTNG_UST_CTL
 WARN_FLAGS = \
-       -Wno-redundant-decls
+       -Wno-redundant-decls \
+       -Wno-missing-field-initializers
 
 AM_CFLAGS += $(WARN_FLAGS)
 AM_CXXFLAGS += $(WARN_FLAGS)
index 17678c6978754d6ad9c5f6e48e9dd770bf42ebce..855ee15cae13a6eb808d76e53833ad378365603e 100644 (file)
@@ -4,6 +4,9 @@ AM_CPPFLAGS += -I$(srcdir) \
        -I$(top_srcdir)/tests/utils/testapp
 
 if HAVE_LIBLTTNG_UST_CTL
+AM_CXXFLAGS += \
+       -Wno-missing-field-initializers
+
 noinst_PROGRAMS = gen-ust-tracef
 gen_ust_tracef_SOURCES = gen-ust-tracef.cpp
 gen_ust_tracef_LDADD = $(UST_LIBS) $(DL_LIBS)
index 8e30100c0bcf5cd2f11e249d7f3a259d856a61f1..92f08f203221458b5c1dce0250ce9162fa34db58 100644 (file)
@@ -154,7 +154,7 @@ end:
 int main(int argc, char **argv)
 {
        int ret;
-       struct validation_ctx ctx = { 0 };
+       struct validation_ctx ctx = {};
 
        /* Check if we have all argument */
        if (argc < 3) {
This page took 0.05428 seconds and 5 git commands to generate.