Re: [libvirt-glib][PATCH] gobject: Drop some unused variables

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

 



On Sat, Dec 05, 2015 at 10:10:47AM +0100, Michal Privoznik wrote:
> After abe983ddf8a569 there are some variables, that are unused:
> 
>   CC       libvirt_gobject_1_0_la-libvirt-gobject-domain-disk.lo
>   CC       libvirt_gobject_1_0_la-libvirt-gobject-domain-interface.lo
>   CC       libvirt_gobject_1_0_la-libvirt-gobject-domain.lo
>   CC       libvirt_gobject_1_0_la-libvirt-gobject-interface.lo
> ../../libvirt-gobject/libvirt-gobject-domain-interface.c: In function 'gvir_domain_interface_finalize':
> ../../libvirt-gobject/libvirt-gobject-domain-interface.c:54:26: error: unused variable 'self' [-Werror=unused-variable]
>      GVirDomainInterface *self = GVIR_DOMAIN_INTERFACE(object);
>                           ^
> cc1: all warnings being treated as errors
> Makefile:724: recipe for target 'libvirt_gobject_1_0_la-libvirt-gobject-domain-interface.lo' failed
> make[3]: *** [libvirt_gobject_1_0_la-libvirt-gobject-domain-interface.lo] Error 1
> make[3]: *** Waiting for unfinished jobs....
> ../../libvirt-gobject/libvirt-gobject-domain-disk.c: In function 'gvir_domain_disk_finalize':
> ../../libvirt-gobject/libvirt-gobject-domain-disk.c:54:21: error: unused variable 'self' [-Werror=unused-variable]
>      GVirDomainDisk *self = GVIR_DOMAIN_DISK(object);
>                      ^
> cc1: all warnings being treated as errors
> Makefile:717: recipe for target 'libvirt_gobject_1_0_la-libvirt-gobject-domain-disk.lo' failed
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
> 
> Pushed under trivial rule.

Thanks, I prepared a similar commit on Friday but forgot to send/push
/o\

> 
>  libvirt-gobject/libvirt-gobject-domain-disk.c      | 2 --
>  libvirt-gobject/libvirt-gobject-domain-interface.c | 2 --
>  2 files changed, 4 deletions(-)
> 
> diff --git a/libvirt-gobject/libvirt-gobject-domain-disk.c b/libvirt-gobject/libvirt-gobject-domain-disk.c
> index 770acff..7f34ebd 100644
> --- a/libvirt-gobject/libvirt-gobject-domain-disk.c
> +++ b/libvirt-gobject/libvirt-gobject-domain-disk.c
> @@ -51,8 +51,6 @@ gvir_domain_disk_error_quark(void)
>  
>  static void gvir_domain_disk_finalize(GObject *object)
>  {
> -    GVirDomainDisk *self = GVIR_DOMAIN_DISK(object);
> -
>      G_OBJECT_CLASS(gvir_domain_disk_parent_class)->finalize(object);
>  }

For what it's worth, the now empty _finalize() method could be removed
(there are one or 2 other places where the same comment applies).

Christophe

Attachment: signature.asc
Description: PGP 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]