From: Simon Marchi Date: Wed, 31 Mar 2021 18:41:48 +0000 (-0400) Subject: Clean-up: common: fix -Wshadow error in lttng_daemonize X-Git-Tag: v2.13.0-rc1~134 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=44635d77b591f83a80d48cd93497bd1cd6aa788d;p=lttng-tools.git Clean-up: common: fix -Wshadow error in lttng_daemonize 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 --- 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 */