From nobody Mon Feb 9 01:50:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1635873080; cv=none; d=zohomail.com; s=zohoarc; b=D/An9vyccRIlp8ZZvBuM1UCvTxQFgoqyOGtrDSguABfXRerLYeJ/SVaFyUuSwJnnhlNc6wq8PE19VxPk7B8pO64UJhWPJKbOQIb7IETpBXllERHreHmVIg/yks7TgSPsgimmMzza5ZStsJDx0jshxZ58blfyVcqAP2BYPTdSITw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635873080; 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; bh=O5FNXFAKHso0lZqZdnsB7P1djNiFJ4fYszMJXToolTk=; b=WGfX/I0p/KI9OPeWm2AmCPIUL+t8ZSKaGmRr7kctPJVVp6LgI0MSdnodOROisj6+4pG2tNYGxuYliwFhaVMFnM1J+34XOgEzjcLTmIQ4CneN43bM75irLqZAhDlvdKzY8tRgjgdW0kHQexmeupx76OdFI3T2TaUEFOac9PoSUyk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1635873080854506.5158480147195; Tue, 2 Nov 2021 10:11:20 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-192-tGju4jktPmyi6qOzgzKybQ-1; Tue, 02 Nov 2021 13:11:17 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8B161814267; Tue, 2 Nov 2021 17:11:03 +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 3830A60C05; Tue, 2 Nov 2021 17:11:03 +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 E084D4E590; Tue, 2 Nov 2021 17:11:02 +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 1A2HAoSs009480 for ; Tue, 2 Nov 2021 13:10:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1AEDB60C05; Tue, 2 Nov 2021 17:10:50 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9888C61077 for ; Tue, 2 Nov 2021 17:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635873079; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=O5FNXFAKHso0lZqZdnsB7P1djNiFJ4fYszMJXToolTk=; b=W25WBe+U4hFGp7G5CGJiQuR15jNhf3/+veqNHi/WH0/b5ebXJhPEyV1wHalhEFqtcrEl9S 5/DJe3pi3+mYSQo+2NpL0oE/7B11M1DnShz5IRdwx6Nfl7nWx3gGY3xhb8HzMbRyBM8XXo e/CUXwhMR4jRtqK6ZRfBP7BIV1XUGZ0= X-MC-Unique: tGju4jktPmyi6qOzgzKybQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 5/5] scripts: Properly declare g_auto() stub for cocci Date: Tue, 2 Nov 2021 18:10:42 +0100 Message-Id: <7b10a217ec882731cf5439035f8366de66908b80.1635872947.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1635873082241100001 Content-Type: text/plain; charset="utf-8" While being great semantic patching tool, coccinelle fails to understand some of macros we use (including those provided by glib). What they have in common is use of __attribute__ under the hood. We store a list of such macros in a file. But in there, g_auto() macro is not defined properly. Indeed, g_auto(type) declares a local variable of given type, for instance from cocci's POV: g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; virBuffer buf =3D VIR_BUFFER_INITIALIZER; are both the same declaration. Fix declaration of g_auto() stub. Signed-off-by: Michal Privoznik --- scripts/cocci-macro-file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index a76ba533b4..4e6d218a97 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -34,6 +34,6 @@ =20 #define g_autoptr(x) x##_autoptr #define g_autofree -#define g_auto +#define g_auto(x) x =20 #define BAD_CAST --=20 2.32.0