dlls/dinput/effect_linuxinput.c: Check return value of 'write'. (bug # 16413)
titon barua
titanix88 at gmail.com
Sun Jan 4 23:06:38 CST 2009
On Sun, 2009-01-04 at 20:49 -0600, Austin English wrote:
> On Sun, Jan 4, 2009 at 4:55 PM, Vitaliy Margolen
> <wine-devel at kievinfo.com> wrote:
> > titon barua wrote:
> >> ---
> >> /* we don't care about the success or failure of this call */
> >> - write(*(This->fd), &event, sizeof(event));
> >> + /* print errors if they occur */
> >> + if (write(*(This->fd), &event, sizeof(event)) == -1) perror ( NULL );
> > What's the point of your patch? What part of the comment isn't clear to you?
> > Also don't use perror. Wine has ERR(), WARN(), TRACE() macros for that.
> >
> > Vitaliy
> >
> >
> >
> >
>
> GCC is complaining about the ignored return value.
>
As the code says /* we dont care */ but gcc prints warnings, is it ok
with just
"if (write(*(This->fd), &event, sizeof(event)));"
Gcc wont complain and the code is as before?
More information about the wine-devel
mailing list