[alsa-devel] [PATCH alsa-lib 1/2] pcm_share: Fix compiler warnings -Wunused-result
Takashi Iwai
tiwai at suse.de
Thu Nov 15 19:50:19 CET 2018
On Thu, 15 Nov 2018 18:30:18 +0100,
Kirill Marinushkin wrote:
>
> Hello Takashi,
>
> On 11/15/18 12:08, Takashi Iwai wrote:
> > On Thu, 15 Nov 2018 08:19:56 +0100,
> > Kirill Marinushkin wrote:
> >>
> >> Before this commit, compilation of `pcm_share` causes warnings "ignoring
> >> return value" for several `read` and `write` operations:
> >>
> >> ~~~~
> >> pcm_share.c: In function '_snd_pcm_share_missing':
> >> pcm_share.c:293:5: warning: ignoring return value of 'read', declared with
> >> attribute warn_unused_result [-Wunused-result]
> >> read(share->slave_socket, buf, 1);
> >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> <...>
> >> ~~~~
> >>
>
> > Which compiler version? I'm using gcc 8.2.1, and couldn't get any
> > warnings like the above.
> >
> >
> > thanks,
> >
> > Takashi
> >
>
> My gcc version is 6.4.0
Then I believe gcc has fixed itself not to warn this kind of things
any longer.
Takashi
More information about the Alsa-devel
mailing list