From: Francis Deslauriers Date: Tue, 4 Feb 2020 21:05:30 +0000 (-0500) Subject: Fix: lttng-events.c: variable may be used uninitialized X-Git-Tag: v2.12.0-rc2~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ae457be2b1c81f72e8eef057203d67089ab96372;p=lttng-modules.git Fix: lttng-events.c: variable may be used uninitialized Fixes the following warning: /home/frdeso/projets/lttng/modules/lttng-events.c: In function ‘print_metadata_escaped_field’: /home/frdeso/projets/lttng/modules/lttng-events.c:2563:5: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (ret) ^ Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: If2db5e1ad9782fb49d6d07026976d3d22f89f2ab --- diff --git a/lttng-events.c b/lttng-events.c index 8b40defe..cc932bf6 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -2529,7 +2529,7 @@ int64_t measure_clock_offset(void) static int print_escaped_ctf_string(struct lttng_session *session, const char *string) { - int ret; + int ret = 0; size_t i; char cur;