From 7f5a4bdd3f8d3c852662380ae0c92383ce3dc365 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Thu, 11 May 2023 15:04:09 +0200 Subject: [PATCH] MT#57410 warning: ignoring return value of 'int pipe(int*)' (tcp_trsp.cpp) This commit fixes this warning: tcp_trsp.cpp: In member function 'virtual void tcp_server_worker::run()': tcp_trsp.cpp:573:7: warning: ignoring return value of 'int pipe(int*)' declared with attribute 'warn_unused_result' [-Wunused-result] 573 | pipe(fake_fds); | ~~~~^~~~~~~~~~ Change-Id: I159153c7bad287b9ca9fe25cd775fc79c4de6cf7 --- core/sip/tcp_trsp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/sip/tcp_trsp.cpp b/core/sip/tcp_trsp.cpp index cbc35ce2..82802f5f 100644 --- a/core/sip/tcp_trsp.cpp +++ b/core/sip/tcp_trsp.cpp @@ -570,7 +570,9 @@ void tcp_server_worker::run() { // fake event to prevent the event loop from exiting int fake_fds[2]; - pipe(fake_fds); + if (pipe(fake_fds)) + WARN("Cannot read from pipe\n"); + struct event* ev_default = event_new(evbase,fake_fds[0], EV_READ|EV_PERSIST,