gcc 9.1.0 warns that struct_fc and var_fc may be used uninitialized.
The code flow doesn't allow this to happen, but this warning is
annoying/scary and easily fixed by initializing both variables to
NULL.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I554affb70275f60eff08134f80b33bc4cefbc91f
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2027
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
/* Find target field class having this name in current context */
for (si = ctx->cur_path->len - 1; si >= 0; si--) {
struct fs_sink_ctf_field_class *fc;
- struct fs_sink_ctf_field_class_struct *struct_fc;
- struct fs_sink_ctf_field_class_variant *var_fc;
+ struct fs_sink_ctf_field_class_struct *struct_fc = NULL;
+ struct fs_sink_ctf_field_class_variant *var_fc = NULL;
struct fs_sink_ctf_named_field_class *named_fc;
uint64_t len;