From nobody Mon Feb 9 05:20:45 2026 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1565783895; cv=none; d=zoho.com; s=zohoarc; b=cYZBW/rss6MVLxEiYp2wKBI2iDhK10+QRmRMG2qtn5thwl/uKVvR0BnxKyNAhulUX/H+HvSi92my5Cd11B7fidRBoCxOqP7YvHbWMUuk4kD7UdK5+czZVB24mjFkzG3W+5enXhKylLTy3GEqXljYUjlivGqVznqdmTdzxq3oh5A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565783895; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=zPHtqhOrWRIgKaUOZNR84DWm51ZLn6KfeJo+yH9nzfQ=; b=G5X1DW7O1j3Gn+zybkxbaMEEmoZY9AVAZwP/lSSsbt/NBfTXxmho8EHrbKDOCtBFUZ3T+JQ6FeCKCdF3QtSw9Vm4rC14mPswd8NAvruvhh8hZJD0FUpFFPRkj+mOqG74CxtlVlYmSAwfNKi0o+xIE07egnli2PFCAoIYaqIfPC4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15657838950413.6707165707770173; Wed, 14 Aug 2019 04:58:15 -0700 (PDT) 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 F037A302C073; Wed, 14 Aug 2019 11:58:13 +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 CB57E8E78D; Wed, 14 Aug 2019 11:58:13 +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 8DE56180BA9A; Wed, 14 Aug 2019 11:58:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7EBvtcK015490 for ; Wed, 14 Aug 2019 07:57:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0B06534912; Wed, 14 Aug 2019 11:57:55 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8AECB348C3 for ; Wed, 14 Aug 2019 11:57:54 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 14 Aug 2019 13:57:33 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 04/18] virpcimock: Drop needless typecast 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-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.46]); Wed, 14 Aug 2019 11:58:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" When creating a PCI device, the pciDevice structure contains @id member which holds device address (DDDD.BB:DD.F) and is type of 'char *'. But the structure is initialized from a const char and in fact we never modify or free the @id. Signed-off-by: Michal Privoznik Reviewed-by: Daniel Henrique Barboza --- tests/virpcimock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/virpcimock.c b/tests/virpcimock.c index 1c21e4e045..853ac588e9 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -120,7 +120,7 @@ struct pciDriver { }; =20 struct pciDevice { - char *id; + const char *id; int vendor; int device; int klass; @@ -878,7 +878,7 @@ init_env(void) =20 # define MAKE_PCI_DEVICE(Id, Vendor, Device, ...) \ do { \ - struct pciDevice dev =3D {.id =3D (char *)Id, .vendor =3D Vendor, \ + struct pciDevice dev =3D {.id =3D Id, .vendor =3D Vendor, \ .device =3D Device, __VA_ARGS__}; \ pci_device_new_from_stub(&dev); \ } while (0) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list