From nobody Sat Apr 27 23:58:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1516200257822265.4203408025277; Wed, 17 Jan 2018 06:44:17 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C18F12E510; Wed, 17 Jan 2018 14:43:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E8E0609B8; Wed, 17 Jan 2018 14:43:44 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EC94D18033DB; Wed, 17 Jan 2018 14:43:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0HEhRL6007743 for ; Wed, 17 Jan 2018 09:43:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 57ACF7E240; Wed, 17 Jan 2018 14:43:27 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D9B67FD4B; Wed, 17 Jan 2018 14:43:22 +0000 (UTC) From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Wed, 17 Jan 2018 14:43:17 +0000 Message-Id: <20180117144317.26215-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] remove bogus casts of arg to g_object_ref X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 17 Jan 2018 14:44:15 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Latest version of glib uses typeof() magic to cast the return value of g_object_ref to match its argument, instead of returning a 'void *'. A few places in the code were casting the arg to G_OBJECT() which was then incompatible with the variable we assigned the result to. The parameter casts were always redundant so just remove them. Signed-off-by: Daniel P. Berrange --- libvirt-gconfig/libvirt-gconfig-object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-object.c b/libvirt-gconfig/lib= virt-gconfig-object.c index 851e35c..ca2c6e6 100644 --- a/libvirt-gconfig/libvirt-gconfig-object.c +++ b/libvirt-gconfig/libvirt-gconfig-object.c @@ -572,7 +572,7 @@ gvir_config_object_set_node_content(GVirConfigObject *o= bject, node =3D gvir_config_object_replace_child(object, node_name); g_return_if_fail(node !=3D NULL); } else { - node =3D g_object_ref(G_OBJECT(object)); + node =3D g_object_ref(object); } encoded_data =3D xmlEncodeEntitiesReentrant(node->priv->node->doc, (xmlChar *)value); @@ -896,7 +896,7 @@ gvir_config_object_attach(GVirConfigObject *parent, GVi= rConfigObject *child, gbo child->priv->doc =3D NULL; } if (parent->priv->doc !=3D NULL) { - child->priv->doc =3D g_object_ref(G_OBJECT(parent->priv->doc)); + child->priv->doc =3D g_object_ref(parent->priv->doc); } } =20 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list