Fix: maybe-uninitialized warning in bt_ctf_stream_flush()
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 30 Apr 2019 15:15:27 +0000 (11:15 -0400)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 2 May 2019 20:50:15 +0000 (20:50 +0000)
commit9f034c64066683f46d97d8df57b8966e0ad1b118
tree437c576504112b5e8b989138125c67e8440be2b4
parent1d7f91d1999fe323b47fb72c59edf21cb2e62e6a
Fix: maybe-uninitialized warning in bt_ctf_stream_flush()

GCC warning:
  In file included from ../../include/babeltrace/ctf-writer/fields-internal.h:41:0,
                   from ../../include/babeltrace/ctf-writer/field-wrapper-internal.h:26,
                   from ../../include/babeltrace/ctf-writer/event-internal.h:37,
                   from stream.c:32:
  stream.c: In function ‘bt_ctf_stream_flush’:
  ../../include/babeltrace/ctfser-internal.h:568:36: error:
  ‘packet_context_offset_bits’ may be used uninitialized in this function
  [-Werror=maybe-uninitialized]
    ctfser->offset_in_cur_packet_bits = offset_bits;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
  stream.c:1608:11: note: ‘packet_context_offset_bits’ was declared here
    uint64_t packet_context_offset_bits;

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ia7457b1a444290ba1a71459bfaf707812227899c
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1029
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
lib/ctf-writer/stream.c
This page took 0.025534 seconds and 4 git commands to generate.