public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/
Date: Wed,  9 Nov 2022 07:30:40 +0000 (UTC)	[thread overview]
Message-ID: <1667979036.73fccc7cee325874e7533e1c809dc26e45e604e0.sam@gentoo> (raw)

commit:     73fccc7cee325874e7533e1c809dc26e45e604e0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  9 07:29:54 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> 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 <sam <AT> 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


             reply	other threads:[~2022-11-09  7:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09  7:30 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-25  8:15 [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/ Sam James
2023-04-07 10:41 Sam James
2022-11-20 23:33 Sam James
2022-11-09  7:39 Sam James
2022-11-09  3:38 Sam James
2022-11-09  3:31 Sam James
2022-08-23  0:33 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1667979036.73fccc7cee325874e7533e1c809dc26e45e604e0.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox