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.8.0~148 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=55b4b79c31952d026d99a83a8b3b6cb2e39e8488;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;