qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] [corrupted]Re: QEMU make error


From: Pavel Dovgalyuk
Subject: Re: [Qemu-discuss] [corrupted]Re: QEMU make error
Date: Tue, 31 Oct 2017 13:57:21 +0300

Thanks for reporting, we'll fix this in the next iteration of patches.

Pavel Dovgalyuk

> -----Original Message-----
> From: Alberto Garcia [mailto:address@hidden
> Sent: Saturday, October 28, 2017 10:56 PM
> To: Akiv Jhirad; address@hidden; Pavel Dovgalyuk
> Subject: [corrupted]Re: [Qemu-discuss] QEMU make error
> 
> On Fri 27 Oct 2017 02:46:54 AM CEST, Akiv Jhirad <address@hidden> wrote:
> > When running make in the qemu build, I get the error:
> >
> > /home/rtems/pc_rtems/qemu/replay/replay-internal.c: In function
> > 'replay_put_array':
> >
> > /home/rtems/pc_rtems/qemu/replay/replay-internal.c:65:15: error:
> >
> > ignoring return value of 'fwrite', declared with attribute
> > warn_unused_result [-Werror=unused-result]
> >
> >          fwrite(buf, 1, size, replay_file);
> >
> >                ^
> 
> The return value of fwrite() should be checked, I would expect something
> like this:
> 
>      if (replay_file) {
>          replay_put_dword(size);
> -        fwrite(buf, 1, size, replay_file);
> +        if (fwrite(buf, 1, size, replay_file) != size) {
> +            error_report("replay write error");
> +        }
>      }
> 
> Pavel, what do you say?
> 
> Berto




reply via email to

[Prev in Thread] Current Thread [Next in Thread]