[libvirt PATCH 06/11] qemu_monitor_json: explicitly ignore return values

Pavel Hrdina phrdina at redhat.com
Mon Nov 16 17:04:38 UTC 2020


On Mon, Nov 16, 2020 at 05:20:00PM +0100, Peter Krempa wrote:
> On Mon, Nov 16, 2020 at 17:09:17 +0100, Pavel Hrdina wrote:
> > On Mon, Nov 16, 2020 at 04:58:56PM +0100, Peter Krempa wrote:
> > > On Mon, Nov 16, 2020 at 16:38:53 +0100, Pavel Hrdina wrote:
> > > > Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> > > > ---
> > > >  src/qemu/qemu_monitor_json.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > I presume this silences a coverity moan about "most of the callers check
> > > the value". NACK in that case.
> > 
> > Yes it does. In that case we should remove ignore_value() from the
> > remaining calls to that function that are not checked.
> 
> Either that, or for a full fix add G_GNUC_UNUSED to the function header.
> Without that nothing would be really fixed and noting will be prevented
> in the future.

I guess you mean using G_GNUC_WARN_UNUSED_RESULT.

There are other cases where coverity complains that the return value is
not checked but probably not all cases, only where the majority is
checked.

I'll ignore these issues for now.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201116/f0dab637/attachment-0001.sig>


More information about the libvir-list mailing list