Warning fix: possible use of uninitialized variable
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 4 Apr 2016 16:41:05 +0000 (12:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 4 Apr 2016 16:58:56 +0000 (12:58 -0400)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index aa030d3b1253f45a716cfa2386c8282c2173611a..ba963ffc53c5e15f44ac756ce2842f9767d27ff5 100644 (file)
@@ -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;
This page took 0.030495 seconds and 4 git commands to generate.