[pulseaudio-discuss] [PATCH] mainloop-signal: Explicitly ignore pa_write() return value.
Tanu Kaskinen
tanuk at iki.fi
Sat Dec 15 23:33:56 PST 2012
On Fri, 2012-03-30 at 11:04 +0300, Tanu Kaskinen wrote:
> 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;
> }
This is now applied.
--
Tanu
More information about the pulseaudio-discuss
mailing list