From: Francis Deslauriers Date: Wed, 21 Nov 2018 00:15:46 +0000 (-0500) Subject: Fix: may be used uninitialized warnings X-Git-Tag: v2.12.0-rc1~695 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=be558f88196eb3637b026673ac8892b8d8288214;p=lttng-tools.git Fix: may be used uninitialized warnings Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index 040ae5f28..1233bf306 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -841,6 +841,7 @@ int evaluate_session_condition_for_client( switch (lttng_condition_get_type(condition)) { case LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING: if (!session_info->rotation.ongoing) { + ret = 0; goto end_session_put; } diff --git a/tests/utils/testapp/gen-ust-nevents-str/gen-ust-nevents-str.c b/tests/utils/testapp/gen-ust-nevents-str/gen-ust-nevents-str.c index 904991a4d..49ad51806 100644 --- a/tests/utils/testapp/gen-ust-nevents-str/gen-ust-nevents-str.c +++ b/tests/utils/testapp/gen-ust-nevents-str/gen-ust-nevents-str.c @@ -24,9 +24,7 @@ int main(int argc, char **argv) { - int count; - int i; - int arg_i; + int count = 0, i = 0, arg_i = 0; if (set_signal_handler()) { return 1;