From ae457be2b1c81f72e8eef057203d67089ab96372 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Tue, 4 Feb 2020 16:05:30 -0500 Subject: [PATCH] Fix: lttng-events.c: variable may be used uninitialized MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- lttng-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1