From: Francis Deslauriers Date: Wed, 21 Nov 2018 00:15:46 +0000 (-0500) Subject: Fix: may be used uninitialized warnings X-Git-Tag: v2.11.0-rc2~108 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d38d3c482a98147df60412fd50e4cc3ea7b1792e;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;