From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id F05655A026D for ; Thu, 17 Nov 2022 06:59:16 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4NCTkl1LdHz4xZp; Thu, 17 Nov 2022 16:59:11 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1668664751; bh=Bx8wGhxMqzA6K+5IsqDg1KIWIWT7H2SAAbimF7etf0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZXX+BCm5juA3Xo6y8QnRfVWTfx019rVkPnAO1XMjqfaH/Q7NcsJNvxuORPJlWclsC satMLXeRZfmaMfPKWvugajBGe3gdRr8xocTKkeIuiPOWmdEhbQ7eVrtrCWviOrW13p +l4OSamNZ7MWngULczejS12ZRnaCWL+irDemB0DM= From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 01/32] clang-tidy: Suppress warning about assignments in if statements Date: Thu, 17 Nov 2022 16:58:37 +1100 Message-Id: <20221117055908.2782981-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221117055908.2782981-1-david@gibson.dropbear.id.au> References: <20221117055908.2782981-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: O5YJFWTFOUN7TRBUFLNX2TAMJNI4ONDL X-Message-ID-Hash: O5YJFWTFOUN7TRBUFLNX2TAMJNI4ONDL X-MailFrom: dgibson@gandalf.ozlabs.org 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: David Gibson 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: 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 1dc2df5..cc4f014 100644 --- a/Makefile +++ b/Makefile @@ -259,11 +259,16 @@ docs: README.md # - readability-identifier-length # Complains about any identifier <3 characters, reasonable for # globals, pointlessly verbose for locals and parameters. +# +# - bugprone-assignment-in-if-condition +# Dubious value over the compiler's built-in warning. Would +# increase verbosity. clang-tidy: $(SRCS) $(HEADERS) clang-tidy -checks=*,-modernize-*,\ -clang-analyzer-valist.Uninitialized,\ -cppcoreguidelines-init-variables,\ + -bugprone-assignment-in-if-condition,\ -bugprone-macro-parentheses,\ -google-readability-braces-around-statements,\ -hicpp-braces-around-statements,\ -- 2.38.1