From: Jérémie Galarneau Date: Mon, 4 Apr 2016 16:41:05 +0000 (-0400) Subject: Warning fix: possible use of uninitialized variable X-Git-Tag: v2.9.0-rc1~296 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a905c62444dc13fa4547d3b86d5d0f3293fa7021;p=lttng-tools.git Warning fix: possible use of uninitialized variable GCC reports that discarded_events and lost_packets may be used uninitialized. Assert that both pointers are not NULL to silence the warning. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index aa030d3b1..ba963ffc5 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -188,6 +188,8 @@ static int get_ust_runtime_stats(struct ltt_session *session, struct ltt_ust_session *usess; usess = session->ust_session; + assert(discarded_events); + assert(lost_packets); if (!usess || !session->has_been_started) { *discarded_events = 0;