[PATCH v1 43/48] perf daemon: Silence -Wshorten-64-to-32 warnings

Ian Rogers
2025-04-01T18:26:04Z

tools/perf/builtin-daemon.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
index f0568431fbd5..640ba8191083 100644
--- a/tools/perf/builtin-daemon.c
+++ b/tools/perf/builtin-daemon.c
@@ -514,7 +514,8 @@ static int daemon_session__control(struct daemon_session *session,
struct pollfd pollfd = { .events = POLLIN, };
char control_path[PATH_MAX];
char ack_path[PATH_MAX];
- int control, ack = -1, len;
+ int control, ack = -1;
+ size_t len;
char buf[20];
int ret = -1;
ssize_t err;
@@ -543,7 +544,7 @@ static int daemon_session__control(struct daemon_session *session,
len = strlen(msg);

err = writen(control, msg, len);
- if (err != len) {
+ if (err != (ssize_t)len) {
pr_err("failed: write to control pipe: %d (%s)\n",
errno, control_path);
goto out;
--
2.49.0.504.g3bcea36a83-goog