From nobody Tue May 13 18:26:39 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1530481477564946.1236841058293; Sun, 1 Jul 2018 14:44:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8904C30E684A; Sun, 1 Jul 2018 21:44:36 +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 23573608F8; Sun, 1 Jul 2018 21:44:36 +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 C431218037EF; Sun, 1 Jul 2018 21:44:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w61LiB5h009028 for ; Sun, 1 Jul 2018 17:44:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 26571308BDA7; Sun, 1 Jul 2018 21:44:11 +0000 (UTC) Received: from mx1.redhat.com (ext-mx19.extmail.prod.ext.phx2.redhat.com [10.5.110.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D38C308BDA5 for ; Sun, 1 Jul 2018 21:44:09 +0000 (UTC) Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9C47D307D859 for ; Sun, 1 Jul 2018 21:43:58 +0000 (UTC) Received: by mail-pl0-f66.google.com with SMTP id a7-v6so6945105plp.3 for ; Sun, 01 Jul 2018 14:43:58 -0700 (PDT) Received: from centos.localdomain ([157.37.164.55]) by smtp.gmail.com with ESMTPSA id v68-v6sm15006933pfv.143.2018.07.01.14.43.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jul 2018 14:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=h0B4SaqcKCjQRkjJk8AwMlcczmxsIUPkKOUun2hwUow=; b=fehunzpLMTrbp9uLXOApwj24qoEsJqQ7ok9SObiUddw2mSS33XtG15BNu7HDeHJlB0 9NP3bsnlhxslVbkSBN/FEbdgXE5NxQovRpRVfRfcyK9gnwML3eSUNTj8InleHj9cFGBI zg2dGTIIAYL7j0WwQ+8Lz1R8ydv4sDWnxsOwnFvG/teY4bQakn+TSHMc2TZBLCHcr1ta eorfnSz8Wcf68ZHv+mXfTMBJtDZwD5nB/F5RnCGyEZmFIZwqhOGM0Y11nPyTXqO1LMGW ExRZXPvZYrW5BeLItv94UKhwNySqsxTFu0MYdf2+wFh4LFaMKDbwhTCHuCWcl7sfhOXT /6kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=h0B4SaqcKCjQRkjJk8AwMlcczmxsIUPkKOUun2hwUow=; b=qC5L44fbL8IAHki4zQOkoyVgFYuZclKMg3xfDH32zSfdg1flB6AqIT32C2jN80RZug kKt1fTmkCV8VLhlmaVCkTzTz7XtinxeyN/Kep7DmYwXxtuDJIXGzbPuCifg0yzORTUJV FPKZpWG2P9hDF7ksNZxJjkAD/BcaJk0Ku40PvJ67yRQ+Dgnwj0R2OAXLcdqO43plALxx Mwila/TJNMY9ySP3KoOID0LEUlNqmvXkaZcrT7NP9RqFRb6yRQ0lumtpJiuqoScvEiSx RsYqN3Q+EsRltyBxQmw3N4+ceWPnxxyAVBwJjO2bUY/hikTHJ6cHWPPLYBqxJJKEKfIZ RbzQ== X-Gm-Message-State: APt69E1fWChLlhikN1KPMUC618+0Yx68/tAu3hqfFbGmwYKDJEnvcqL/ 3i0iNhU7CF4CgzdGGHSWKBLuszON X-Google-Smtp-Source: AAOMgpdEBWzqSDum0PlP+4ArvGSAWsggEGRu0j3YQ82eNyyLCQfgqmIH1rdv7cJhnB8OIm9CvJLmlw== X-Received: by 2002:a17:902:7888:: with SMTP id q8-v6mr18250110pll.79.1530481437935; Sun, 01 Jul 2018 14:43:57 -0700 (PDT) From: Sukrit Bhatnagar To: libvir-list@redhat.com Date: Sat, 30 Jun 2018 14:30:08 +0530 Message-Id: <1530349239-22049-5-git-send-email-skrtbhtngr@gmail.com> In-Reply-To: <1530349239-22049-1-git-send-email-skrtbhtngr@gmail.com> References: <1530349239-22049-1-git-send-email-skrtbhtngr@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Sun, 01 Jul 2018 21:43:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Sun, 01 Jul 2018 21:43:58 +0000 (UTC) for IP:'209.85.160.66' DOMAIN:'mail-pl0-f66.google.com' HELO:'mail-pl0-f66.google.com' FROM:'skrtbhtngr@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.766 * (DATE_IN_PAST_24_48, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.160.66 mail-pl0-f66.google.com 209.85.160.66 mail-pl0-f66.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.48 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 04/35] cfg.mk: single variable declaration per line when using cleanup macro 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Sun, 01 Jul 2018 21:44:37 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add rule to ensure that each variable declaration made using a cleanup macro is in its own separate line. Sometimes a variable might be initialized from a value returned by a macro or a function, which may take on more than one parameter, thereby introducing a comma, which might be mistaken for multiple declarations in a line. This rule takes care of that too. Signed-off-by: Sukrit Bhatnagar --- cfg.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cfg.mk b/cfg.mk index d9e90d5..7949fc8 100644 --- a/cfg.mk +++ b/cfg.mk @@ -1077,6 +1077,14 @@ sc_require_attribute_cleanup_scalar_type_space: halt=3D'there must be exactly one space between the type and asterisk = inside VIR_AUTOFREE' \ $(_sc_search_regexp) =20 +# Rule to ensure that there is only one variable declaration in +# a line when the variable is declared using a cleanup macro. +sc_require_attribute_cleanup_one_per_line: + @prohibit=3D'VIR_AUTO(FREE|PTR)\(.+\) ([^\(]*(, .*)+|[^\(]*\(.*\)(, .*)+)= ;' \ + in_vc_files=3D'\.[chx]$$' \ + halt=3D'there must be only one variable declaration per line when usin= g cleanup macro' \ + $(_sc_search_regexp) + # We don't use this feature of maint.mk. prev_version_file =3D /dev/null =20 --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list