From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 3BDE25A0082 for ; Thu, 17 Nov 2022 00:53:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668642828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1qCfP7IEuvgYd9vrtwIO44Brx+248GBYvoS91Btx+VE=; b=JLMxOhWNZjWq/gHlTolAdv8mIPzqqrr4bDSnlThpriZxy4jbsPhJsXFnGw/uW/AVZ3OoK2 J6Sp9dbPkLMQC2Ui2z7RbO8Yfy2yWKLX8+0K9CsKXqavoJu6yeZN3JZNMglEQ4xnoT927E +CCuX41hAxdQ45nn5jA8uscW4HaHops= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-42-chJZMOs1PcmUV0hUazW8Jg-1; Wed, 16 Nov 2022 18:53:46 -0500 X-MC-Unique: chJZMOs1PcmUV0hUazW8Jg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D25713C01DF4; Wed, 16 Nov 2022 23:53:45 +0000 (UTC) Received: from maya.cloud.tilaa.com (ovpn-208-8.brq.redhat.com [10.40.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9805B2027064; Wed, 16 Nov 2022 23:53:45 +0000 (UTC) Date: Thu, 17 Nov 2022 00:10:48 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 01/32] clang-tidy: Suppress warning about assignments in if statements Message-ID: <20221117001048.4b672b6b@elisabeth> In-Reply-To: <20221116044212.3876516-2-david@gibson.dropbear.id.au> References: <20221116044212.3876516-1-david@gibson.dropbear.id.au> <20221116044212.3876516-2-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: V4ONSMLGV6R3RVCB2MJPCTJHK6ED4ZQO X-Message-ID-Hash: V4ONSMLGV6R3RVCB2MJPCTJHK6ED4ZQO X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, 16 Nov 2022 15:41:41 +1100 David Gibson wrote: > clang-tools 15.0.0 appears to have added a new warning that will always > complain about assignments in if statements, which we use in a number of > places in passt/pasta. Encountered on Fedora 37 with > clang-tools-extra-15.0.0-3.fc37.x86_64. > > Suppress the new warning so that we can compile and test. > > Signed-off-by: David Gibson > --- > Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Makefile b/Makefile > index 6b22408..8bcbbc0 100644 > --- a/Makefile > +++ b/Makefile > @@ -262,6 +262,7 @@ clang-tidy: $(SRCS) $(HEADERS) > clang-tidy -checks=*,-modernize-*,\ > -clang-analyzer-valist.Uninitialized,\ > -cppcoreguidelines-init-variables,\ > + -bugprone-assignment-in-if-condition,\ I'm trying to keep, in the comment just above, a list of clang-tidy warnings we disable and the reason. I think this could just be grouped with: # - cppcoreguidelines-init-variables # Dubious value, would kill readability -- Stefano