From nobody Thu May 15 04:37:51 2025 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 1509111167089936.2179363311639; Fri, 27 Oct 2017 06:32:47 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1DD2C82111; Fri, 27 Oct 2017 13:32:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D36F5DD6A; Fri, 27 Oct 2017 13:32: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 377EC6EF21; Fri, 27 Oct 2017 13:32:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9RDVq2Y000924 for ; Fri, 27 Oct 2017 09:31:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id B49195CC3B; Fri, 27 Oct 2017 13:31:52 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-204-199.brq.redhat.com [10.40.204.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD61A60BEB; Fri, 27 Oct 2017 13:31:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1DD2C82111 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Fri, 27 Oct 2017 14:31:39 +0100 Message-Id: <20171027133143.2553-2-berrange@redhat.com> In-Reply-To: <20171027133143.2553-1-berrange@redhat.com> References: <20171027133143.2553-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH dbus 1/5] util: don't inline virtDBusUtilVirDomainListFreep 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: , Content-Type: text/plain; charset="utf-8" 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 27 Oct 2017 13:32:45 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 When building GCC reports that it'll never inline this method, so don't mark it status+inline as that will cause multiple instances of it to be defined in each source file that includes util.h In file included from manager.c:4:0: manager.c: In function =E2=80=98virtDBusManagerEnumarateDomains=E2=80=99: util.h:62:1: error: inlining failed in call to =E2=80=98virtDBusUtilVirDoma= inListFreep.isra.0=E2=80=99: call is unlikely and code size would grow [-We= rror=3Dinline] virtDBusUtilVirDomainListFreep(virDomainPtr **domainsp) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ manager.c:17:61: note: called from here _cleanup_(virtDBusUtilVirDomainListFreep) virDomainPtr *domains =3D NU= LL; ^~~~~~~ Signed-off-by: Daniel P. Berrange --- src/util.c | 14 ++++++++++++++ src/util.h | 15 ++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/util.c b/src/util.c index 8f0796a..2445ce0 100644 --- a/src/util.c +++ b/src/util.c @@ -94,3 +94,17 @@ virtDBusUtilVirDomainFromBusPath(virConnectPtr connectio= n, =20 return virDomainLookupByUUIDString(connection, name); } + +void +virtDBusUtilVirDomainListFreep(virDomainPtr **domainsp) +{ + virDomainPtr *domains =3D *domainsp; + + if (!domains) + return; + + for (int i =3D 0; domains[i] !=3D NULL; i +=3D 1) + virDomainFree(domains[i]); + + free(domains); +} diff --git a/src/util.h b/src/util.h index 782c588..3c80fef 100644 --- a/src/util.h +++ b/src/util.h @@ -56,16 +56,5 @@ virtDBusUtilVirDomainFreep(virDomainPtr *domainp) virDomainFree(*domainp); } =20 -static inline void -virtDBusUtilVirDomainListFreep(virDomainPtr **domainsp) -{ - virDomainPtr *domains =3D *domainsp; - - if (!domains) - return; - - for (int i =3D 0; domains[i] !=3D NULL; i +=3D 1) - virDomainFree(domains[i]); - - free(domains); -} +void +virtDBusUtilVirDomainListFreep(virDomainPtr **domainsp); --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list