From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 936D6158020 for ; Wed, 9 Nov 2022 07:30:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 643F2E0896; Wed, 9 Nov 2022 07:30:43 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 477FFE0896 for ; Wed, 9 Nov 2022 07:30:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3620A340F04 for ; Wed, 9 Nov 2022 07:30:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5961E6F8 for ; Wed, 9 Nov 2022 07:30:40 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1667979036.73fccc7cee325874e7533e1c809dc26e45e604e0.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/ X-VCS-Repository: proj/portage X-VCS-Files: NEWS bin/install-qa-check.d/90gcc-warnings X-VCS-Directories: / bin/install-qa-check.d/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 73fccc7cee325874e7533e1c809dc26e45e604e0 X-VCS-Branch: master Date: Wed, 9 Nov 2022 07:30:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f950348-769e-4c2c-89d6-a353a7c59f7d X-Archives-Hash: 8c321c6ad5aa4b2b304525f3a272d214 commit: 73fccc7cee325874e7533e1c809dc26e45e604e0 Author: Sam James gentoo org> AuthorDate: Wed Nov 9 07:29:54 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Nov 9 07:30:36 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=73fccc7c install-qa-check.d/90gcc-warnings: add more Clang warnings All of these are either smells of something wrong or likely UB: -Wstrlcpy-strlcat-size -Wstrncat-size -Wsuspicious-bzero -Wvarargs Signed-off-by: Sam James gentoo.org> NEWS | 4 ++++ bin/install-qa-check.d/90gcc-warnings | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 16552ea7d..5ee6e3bd1 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,10 @@ Features: * -Wreturn-type * -Wstringop-overflow (GCC, FORTIFY_SOURCE) * -Wfortify-source (Clang, FORTIFY_SOURCE) + * -Wstrlcpy-strlcat-size + * -Wstrncat-size + * -Wsuspicious-bzero + * -Wvarargs * -Wargument-undefined-behaviour (Clang) * -Wincompatible-function-pointer-types (Clang, becomes fatal in Clang 16) (note we already have -Wincompatible-pointer-types in the list for GCC) diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings index 7fd8502ef..845a83b08 100644 --- a/bin/install-qa-check.d/90gcc-warnings +++ b/bin/install-qa-check.d/90gcc-warnings @@ -49,6 +49,12 @@ gcc_warn_check() { 'warning: .*assuming pointer wraparound does not occur' 'warning: .*escape sequence out of range' + # all clang + 'warning: .*\[-Wstrlcpy-strlcat-size\]' + 'warning: .*\[-Wstrncat-size\]' + 'warning: .*\[-Wsuspicious-bzero\]' + 'warning: .*\[-Wvarargs\]' + # left-hand operand of comma expression has no effect 'warning: .*left.*comma.*\[-Wunused-value\]' # converting to non-pointer type ... from NULL and likes