From 0f3eaad4c02e725a7310d94ebdaa858344b9bdbe 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 1ccbffd6..a4160f1c 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -2517,7 +2517,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