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
mr11.4.1
Donat Zenichev 3 years ago
parent e79e20c3bd
commit 7f5a4bdd3f

@ -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,

Loading…
Cancel
Save