Re: [PATCH 2/2] vbox: Resolve Coverity CHECKED_RETURN

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

 



On Thu, Nov 19, 2015 at 09:06:05AM -0500, John Ferlan wrote:
> Other callers check return from virDomainGraphicsListenSetAddress, but
> vbox doesn't in it's vboxDumpDisplay. Follow other instances within vbox
> to just ignore the return value in the vboxDump* functions.
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/vbox/vbox_common.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 

NACK, this silences the error instead of resolving it.

You can achieve the same result by not running Coverity at all :)

Jan

> diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
> index 3e6ed7a..4576a07 100644
> --- a/src/vbox/vbox_common.c
> +++ b/src/vbox/vbox_common.c
> @@ -3408,8 +3408,9 @@ vboxDumpDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
>                  if (netAddressUtf16) {
>                      VBOX_UTF16_TO_UTF8(netAddressUtf16, &netAddressUtf8);
>                      if (STRNEQ(netAddressUtf8, ""))
> -                        virDomainGraphicsListenSetAddress(def->graphics[def->ngraphics], 0,
> -                                                          netAddressUtf8, -1, true);
> +                        ignore_value(virDomainGraphicsListenSetAddress(
> +                                     def->graphics[def->ngraphics], 0,
> +                                     netAddressUtf8, -1, true));
>                      VBOX_UTF16_FREE(netAddressUtf16);
>                      VBOX_UTF8_FREE(netAddressUtf8);
>                  }
> -- 
> 2.5.0
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]