From: Michael Jeanson Date: Wed, 14 Oct 2015 21:05:53 +0000 (-0400) Subject: Fix: Silence warning formating pid_t as int X-Git-Tag: v2.8.0-rc1~265 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d1f721c52e3810dcb38429cb3beec9f80043aa57;p=lttng-tools.git Fix: Silence warning formating pid_t as int Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c index 10a0e5fdf..8452c1a6c 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -207,7 +207,7 @@ int setup_health_path(void) } snprintf(health_unix_sock_path, sizeof(health_unix_sock_path), DEFAULT_GLOBAL_RELAY_HEALTH_UNIX_SOCK, - getpid()); + (int) getpid()); } else { /* Set health check Unix path */ if (strlen(health_unix_sock_path) != 0) { @@ -216,7 +216,7 @@ int setup_health_path(void) snprintf(health_unix_sock_path, sizeof(health_unix_sock_path), DEFAULT_HOME_RELAY_HEALTH_UNIX_SOCK, - home_path, getpid()); + home_path, (int) getpid()); } end: diff --git a/src/common/utils.c b/src/common/utils.c index e3f1bf7e6..11018739b 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -479,7 +479,7 @@ int utils_create_pid_file(pid_t pid, const char *filepath) goto error; } - ret = fprintf(fp, "%d\n", pid); + ret = fprintf(fp, "%d\n", (int) pid); if (ret < 0) { PERROR("fprintf pid file"); goto error; @@ -488,7 +488,7 @@ int utils_create_pid_file(pid_t pid, const char *filepath) if (fclose(fp)) { PERROR("fclose"); } - DBG("Pid %d written in file %s", pid, filepath); + DBG("Pid %d written in file %s", (int) pid, filepath); ret = 0; error: return ret;