From d1f721c52e3810dcb38429cb3beec9f80043aa57 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 14 Oct 2015 17:05:53 -0400 Subject: [PATCH] Fix: Silence warning formating pid_t as int MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- src/bin/lttng-relayd/health-relayd.c | 4 ++-- src/common/utils.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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; -- 2.34.1