From 44635d77b591f83a80d48cd93497bd1cd6aa788d Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 31 Mar 2021 14:41:48 -0400 Subject: [PATCH 1/1] Clean-up: common: fix -Wshadow error in lttng_daemonize MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There are two ret variables in the function, not of the same type. Fix it by moving one to a narrower scope. Change-Id: If09dc67e95f3d01f9796555fa005638bcb172279 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- src/common/daemonize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/daemonize.c b/src/common/daemonize.c index 594cc5815..cb094b1ef 100644 --- a/src/common/daemonize.c +++ b/src/common/daemonize.c @@ -22,7 +22,6 @@ LTTNG_HIDDEN int lttng_daemonize(pid_t *child_ppid, int *completion_flag, int close_fds) { - int ret; pid_t pid; /* Get parent pid of this process. */ @@ -35,6 +34,7 @@ int lttng_daemonize(pid_t *child_ppid, int *completion_flag, } else if (pid == 0) { int fd; pid_t sid; + int ret; /* Child */ -- 2.34.1