From 562378e62ffc5d217e18d287ce2528d40a16f1a4 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Tue, 3 Apr 2012 10:18:55 +0300 Subject: [PATCH] cpulimit: Explicitly ignore pa_read() return value. It doesn't matter if the function fails (I'm not sure if it's even possible), because the read data isn't used for anything and the daemon will terminate in any case. The void cast should get rid of a Coverity warning. Removing the whole pa_read() call should be ok too, but I guess it's nice to clean up the pipe before terminating... --- src/daemon/cpulimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c index 3a97297..0abbac0 100644 --- a/src/daemon/cpulimit.c +++ b/src/daemon/cpulimit.c @@ -167,7 +167,7 @@ static void callback(pa_mainloop_api*m, pa_io_event*e, int fd, pa_io_event_flags pa_log("Received request to terminate due to CPU overload."); - pa_read(the_pipe[0], &c, sizeof(c), NULL); + (void) pa_read(the_pipe[0], &c, sizeof(c), NULL); m->quit(m, 1); /* Quit the main loop */ } -- 2.7.4