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: before-upstreaming~34 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0f3eaad4c02e725a7310d94ebdaa858344b9bdbe;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 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;