[pulseaudio-discuss] [PATCH] mainloop-signal: Explicitly ignore pa_write() return value.
Tanu Kaskinen
tanu.kaskinen at digia.com
Fri Mar 30 01:04:33 PDT 2012
Coverity warned about an ignored return value. I'm not sure
if there's something that should be done if writing fails;
at least I couldn't think of anything. Would logging an
error be acceptable here?
---
src/pulse/mainloop-signal.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/pulse/mainloop-signal.c b/src/pulse/mainloop-signal.c
index 9482fe3..89aafcb 100644
--- a/src/pulse/mainloop-signal.c
+++ b/src/pulse/mainloop-signal.c
@@ -72,7 +72,8 @@ static void signal_handler(int sig) {
signal(sig, signal_handler);
#endif
- pa_write(signal_pipe[1], &sig, sizeof(sig), NULL);
+ /* XXX: If writing fails, there's nothing we can do? */
+ (void) pa_write(signal_pipe[1], &sig, sizeof(sig), NULL);
errno = saved_errno;
}
--
1.7.8
More information about the pulseaudio-discuss
mailing list