public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/
@ 2022-08-23  0:33 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-08-23  0:33 UTC (permalink / raw
  To: gentoo-commits

commit:     772fdceea5f148d9bb5fd6c87ffd48f87ca93bab
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 23 00:27:52 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 23 00:33:19 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=772fdcee

bin/install-qa-check.d: drop QA_PKGCONFIG_VERSION checks from 60pkgconfig

They've been too noisy. We can consider restoring this with an opt-in
check (perhaps by setting QA_PKGCONFIG_VERSION) in future.

Bug: https://bugs.gentoo.org/857654
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                               |  3 ++
 bin/install-qa-check.d/60pkgconfig | 60 --------------------------------------
 2 files changed, 3 insertions(+), 60 deletions(-)

diff --git a/NEWS b/NEWS
index 87799bc4f..9cf67107a 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,9 @@ Bug fixes:
 
 * dispatch-conf: respect (E)ROOT
 
+* install-qa-check.d: 60pkgconfig: drop noisy pkg-config mismatched Version
+  field check (bug 857654).
+
 * install-qa-check.d: 60pkgconfig: fix --validate check by adding
   ${ED}/usr/{lib*,share} to search path.
 

diff --git a/bin/install-qa-check.d/60pkgconfig b/bin/install-qa-check.d/60pkgconfig
index 20acaa7fb..f44ec232a 100644
--- a/bin/install-qa-check.d/60pkgconfig
+++ b/bin/install-qa-check.d/60pkgconfig
@@ -88,66 +88,6 @@ pkgconfig_check() {
 		eqawarn "(contains reference to either lib or lib64 in wrong directory)"
 		eqatag -v pkgconfig.bad-libdir "${bad_libdir[@]}"
 	fi
-
-	# Check for mismatched Version field vs ${PV}
-	# To be safe, let's make sure _all_ installed .pcs have a bad Version
-	# before warning, as this should catch the general cases we're worried
-	# about, while avoiding any pathological cases e.g. multiple libraries
-	# with different versioning within one package.
-	# Example bugs: bug #833895, bug #833887.
-
-	# Default to PV if QA_PKGCONFIG_VERSION is unset.
-	if [[ -z ${QA_PKGCONFIG_VERSION+set} ]]; then
-		local QA_PKGCONFIG_VERSION=${PV}
-	fi
-
-	# Skip the check if QA_PKGCONFIG_VERSION is set to empty string.
-	if [[ -n ${QA_PKGCONFIG_VERSION} ]]; then
-		local pms_ver_re="^([0-9]+(\.[0-9]+)*)([a-z]?)((_(alpha|beta|pre|rc|p)[0-9]*)*)(-r[0-9]+)?$"
-		local -A bad_files
-
-		local is_pms_ver=false
-		if [[ ${QA_PKGCONFIG_VERSION} =~ ${pms_ver_re} ]] ; then
-			# Ensure that ver_test is available.
-			[[ $(type -t ver_test) == function ]] || inherit eapi7-ver
-			is_pms_ver=true
-		fi
-
-		for f in "${files[@]}" ; do
-			local file_version=$(pkg-config --modversion "${f}")
-			if [[ -n ${file_version} ]] ; then
-				if ${is_pms_ver} && [[ ${file_version} =~ ${pms_ver_re} ]]; then
-					# If both versions comply to PMS, then we can use ver_test to compare them.
-					ver_test ${QA_PKGCONFIG_VERSION} -eq ${file_version} && continue
-				else
-					# Otherwise, we resort to string comparision.
-					[[ ${QA_PKGCONFIG_VERSION} == ${file_version} ]] && continue
-				fi
-			else
-				# Record a special value if the .pc file has no version set at all.
-				file_version="<no-set>"
-			fi
-
-			bad_files["${f//${D}}"]="${file_version}"
-		done
-
-		# Skip result reporting if *_p* because for both _pN and _preN, we
-		# don't generally expect the versions to be exactly accurate, and
-		# we want to avoid false positives.
-		if [[ ${#bad_files[@]} -gt 0 && ${PV} != *_p* ]] && ! has live ${PROPERTIES} ; then
-			eqawarn "QA Notice: pkg-config files with mismatched Version found!"
-			eqawarn "The Version field of the following files does not match ${PV}"
-			local bad_file
-			for bad_file in "${!bad_files[@]}"; do
-				local bad_file_version="${bad_files[${bad_file}]}"
-				eqawarn "- ${bad_file}: ${bad_file_version}"
-			done
-			eqawarn "Please check all .pc files installed by this package."
-			eqawarn "You can use QA_PKGCONFIG_VERSION to set the expected version,"
-			eqawarn "or set to the empty string to disable this QA check."
-			eqatag pkgconfig.unexpected-version ${!bad_files[@]}
-		fi
-	fi
 }
 
 pkgconfig_check


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/
@ 2022-11-09  3:31 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-11-09  3:31 UTC (permalink / raw
  To: gentoo-commits

commit:     4a5dbb20506e366b205279a10504b66a2a96540a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  9 03:27:34 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov  9 03:31:48 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=4a5dbb20

install-qa-check.d/90gcc-warnings: add -Wpointer-to-int-cast for completeness

Opposite side of -Wint-to-pointer-cast.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                                  | 1 +
 bin/install-qa-check.d/90gcc-warnings | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/NEWS b/NEWS
index 4745b580d..f8441b6ec 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,7 @@ Features:
   * -Wundefined-reinterpret-cast (Clang, C++ strict aliasing)
   * -Wint-conversion
   * -Wint-to-pointer-cast
+  * -Wpointer-to-int-cast
 
 * install-qa-check.d: 90gcc-warnings: Always die on -Wimplicit-function-declaration
   and remove bin/check-implicit-pointer-usage.py of dubious licencing (it was

diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings
index b8b5f7147..2edabcde7 100644
--- a/bin/install-qa-check.d/90gcc-warnings
+++ b/bin/install-qa-check.d/90gcc-warnings
@@ -64,6 +64,8 @@ gcc_warn_check() {
 			'warning: .*\[-Wint-conversion\]'
 			# warning: cast to ... from integer of different size (or smaller size)
 			'warning: .*\[-Wint-to-pointer-cast\]'
+			# warning: cast from ... to integer of different size
+			'warning: .*\[-Wpointer-to-int-cast\]'
 
 			# outdated?
 			'warning: .*too few arguments for format'


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/
@ 2022-11-09  3:38 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-11-09  3:38 UTC (permalink / raw
  To: gentoo-commits

commit:     c4df46e3da5fee516dba000ade492c2462db99fd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  9 03:36:39 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov  9 03:38:13 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=c4df46e3

install-qa-check.d/90gcc-warnings: update outdated -Wformat pattern

This only covers missing specifiers. We may add generic -Wformat (as commented
out) for time_t & LFS stuff later on, but I don't want to do it in portage 3.0.39
as we're adding enough new stuff here.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                                  | 3 +++
 bin/install-qa-check.d/90gcc-warnings | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index cf3487e4b..6fe36cbe0 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,9 @@ Features:
   * -Wint-to-pointer-cast
   * -Wpointer-to-int-cast
   * -Wint-to-void-pointer-cast
+  * Further -Wformat matches for missing specifiers.
+    In future, we may warn on all -Wformat (in particular because of e.g.
+    time_t & LFS).
 
 * install-qa-check.d: 90gcc-warnings: Always die on -Wimplicit-function-declaration
   and remove bin/check-implicit-pointer-usage.py of dubious licencing (it was

diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings
index cdffcd029..d8322871b 100644
--- a/bin/install-qa-check.d/90gcc-warnings
+++ b/bin/install-qa-check.d/90gcc-warnings
@@ -69,8 +69,12 @@ gcc_warn_check() {
 			# warning: cast from ... to integer of different size
 			'warning: .*\[-Wpointer-to-int-cast\]'
 
-			# outdated?
+			# -Wformat
+			# TODO: comment out some time in future for time_t & LFS preparedness
+			#'warning: .*\[-Wformat=\]'
+			# -Wformat variants
 			'warning: .*too few arguments for format'
+			'warning: .*missing sentinel in function call.*\[-Wformat=\]'
 			# format ... expects a matching ... argument
 			# (iow, too few arguments for format in new wording :))
 			'warning: .*matching.*\[-Wformat=\]'


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/
@ 2022-11-09  7:30 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-11-09  7:30 UTC (permalink / raw
  To: gentoo-commits

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/
@ 2022-11-09  7:39 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-11-09  7:39 UTC (permalink / raw
  To: gentoo-commits

commit:     739e8de006c6c2a247edef3e616fcdecba28edc8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  9 07:38:53 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov  9 07:38:53 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=739e8de0

install-qa-check.d/90gcc-warnings: drop some conversion warnings for now

While I want to keep these, Bash triggers them with a trick it uses
to force truncation in random.c, and I can't really justify FEATURES=stricter
stopping Bash from installing.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                                  |  4 ----
 bin/install-qa-check.d/90gcc-warnings | 13 +++++++++----
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/NEWS b/NEWS
index 5ee6e3bd1..2480f55a8 100644
--- a/NEWS
+++ b/NEWS
@@ -30,10 +30,6 @@ Features:
   * -Wincompatible-function-pointer-types (Clang, becomes fatal in Clang 16)
     (note we already have -Wincompatible-pointer-types in the list for GCC)
   * -Wundefined-reinterpret-cast (Clang, C++ strict aliasing)
-  * -Wint-conversion
-  * -Wint-to-pointer-cast
-  * -Wpointer-to-int-cast
-  * -Wint-to-void-pointer-cast
   * -Wcast-function-type-strict (Clang, CFI)
   * Further -Wformat matches for missing specifiers.
     In future, we may warn on all -Wformat (in particular because of e.g.

diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings
index 845a83b08..7a27b5aaa 100644
--- a/bin/install-qa-check.d/90gcc-warnings
+++ b/bin/install-qa-check.d/90gcc-warnings
@@ -66,14 +66,19 @@ gcc_warn_check() {
 			# the address of ... will never be NULL and likes
 			# (uses of function refs & string constants in conditionals)
 			'warning: .*\[-Waddress\]'
+
+			# TODO: we want to enable these but bash currently triggers
+			# them with a trick in random.c where it intentionally wants
+			# some truncation :(
+			#
 			# warning: assignment/initialization to ... from ... makes integer from pointer without cast
-			'warning: .*\[-Wint-conversion\]'
+			#'warning: .*\[-Wint-conversion\]'
 			# warning: cast to ... from integer of different size (or smaller size)
-			'warning: .*\[-Wint-to-pointer-cast\]'
+			#'warning: .*\[-Wint-to-pointer-cast\]'
 			# warning: cast to ... from (smaller) integer type
-			'warning: .*\[-Wint-to-void-pointer-cast\]'
+			#'warning: .*\[-Wint-to-void-pointer-cast\]'
 			# warning: cast from ... to integer of different size
-			'warning: .*\[-Wpointer-to-int-cast\]'
+			#'warning: .*\[-Wpointer-to-int-cast\]'
 
 			# -Wformat
 			# TODO: comment out some time in future for time_t & LFS preparedness


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/
@ 2022-11-20 23:33 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-11-20 23:33 UTC (permalink / raw
  To: gentoo-commits

commit:     0fdbbbdb5a80e331adf701f2b2c1f096695447c4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 20 23:32:08 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 20 23:33:43 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=0fdbbbdb

install-qa-check.d/90gcc-warnings: don't make implicit func decls fatal for now

We need to do this at some point (as Clang 16 and GCC 14 are doing it, and
they indicate runtime problems anyway), but there's too much breakage for now.

We did find some extra bugs though. The main issue is too much high-profile
stuff breaks rather than the total number of bugs, wrt Portage behaviour
changing being suitable or not.

Bug: https://bugs.gentoo.org/870412
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                                  | 4 ++++
 bin/install-qa-check.d/90gcc-warnings | 7 ++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 7b97f2a86..28f482350 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,10 @@ Bug fixes:
 
 * Fix DeprecationWarning in sets.
 
+* install-qa-check.d: 90gcc-warnigns: Disable -Wimplicit-function-declaration being
+  fatal for now. The number of failures in bug #870412 is too large for the time
+  being.
+
 portage-3.0.39 (2022-11-20)
 --------------
 

diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings
index 7a27b5aaa..431cc7639 100644
--- a/bin/install-qa-check.d/90gcc-warnings
+++ b/bin/install-qa-check.d/90gcc-warnings
@@ -153,9 +153,10 @@ gcc_warn_check() {
 			#	always_overflow=yes
 			#fi
 
-			if [[ ${f} == *'[-Wimplicit-function-declaration]'* ]] ; then
-				implicit_func_decl=yes
-			fi
+			# Disabled for now because too many failures. bug #870412.
+			#if [[ ${f} == *'[-Wimplicit-function-declaration]'* ]] ; then
+			#	implicit_func_decl=yes
+			#fi
 
 			if [[ ${always_overflow} = yes || ${implicit_func_decl} = yes ]] ; then
 				eerror


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/
@ 2023-04-07 10:41 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2023-04-07 10:41 UTC (permalink / raw
  To: gentoo-commits

commit:     e9eb2f7b8b25559b555c0ec8806b602e486753de
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  7 10:39:53 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr  7 10:41:46 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e9eb2f7b

bin/install-qa-check.d/90gcc-warnings: add more warnings

These are all indicative of possible runtime issues.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                                  | 15 +++++++++++++++
 bin/install-qa-check.d/90gcc-warnings |  9 +++++++++
 2 files changed, 24 insertions(+)

diff --git a/NEWS b/NEWS
index 0361e6ac6..3dfaf2a09 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,18 @@
+portage-3.0.47 (UNRELEASED)
+---------------
+
+Features:
+* install-qa-check.d: 90gcc-warnings: Add additional code quality warnings:
+  - -Wrestrict
+  - -Wstringop-overread
+  - -Wstringop-truncation
+  - -Wformat-truncation
+  - -Wcast-function-type
+  - -Wnull-dereference
+  - -Wmain
+  - -Wimplicit-int
+  - -Wstring-compare
+
 portage-3.0.46 (2023-04-07)
 ---------------
 

diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings
index dbfbc4a9a..449bf2362 100644
--- a/bin/install-qa-check.d/90gcc-warnings
+++ b/bin/install-qa-check.d/90gcc-warnings
@@ -19,6 +19,7 @@ gcc_warn_check() {
 			# only will and does, no might :)
 			'warning: .*will.*\[-Wstrict-aliasing\]'
 			'warning: .*does.*\[-Wstrict-aliasing\]'
+			'warning: .*\[-Wrestrict\]'
 			# strict aliasing violation in C++ (Clang)
 			'warning: .*\[-Wundefined-reinterpret-cast\]'
 
@@ -44,6 +45,8 @@ gcc_warn_check() {
 			'warning: .*will always overflow destination buffer'
 			# compile-time part of FORTIFY_SOURCE
 			'warning: .*\[-Wstringop-overflow\]'
+			'warning: .*\[-Wstringop-overread\]'
+			'warning: .*\[-Wstringop-truncation\]'
 			# clang-only, equivalent of -Wstringop-overflow
 			'warning: .*\[-Wfortify-source\]'
 			'warning: .*assuming pointer wraparound does not occur'
@@ -86,6 +89,7 @@ gcc_warn_check() {
 			# -Wformat variants
 			'warning: .*too few arguments for format'
 			'warning: .*missing sentinel in function call.*\[-Wformat=\]'
+			'warning: .*\[-Wformat-truncation\]'
 			# format ... expects a matching ... argument
 			# (iow, too few arguments for format in new wording :))
 			'warning: .*matching.*\[-Wformat=\]'
@@ -104,6 +108,8 @@ gcc_warn_check() {
 			# more specific form of -Wincompatible-pointer-types (Clang)
 			'warning: .*\[-Wincompatible-function-pointer-types\]'
 			# these will fail with CFI (https://reviews.llvm.org/D134831)
+			# (gcc lacks -strict)
+			#'warning: .*\[-Wcast-function-type\]'
 			'warning: .*\[-Wcast-function-type-strict\]'
 			# using wrong deallocator, e.g. using free() on object allocated using my_malloc()
 			# when my_malloc() is annotated as needing my_free().
@@ -117,9 +123,12 @@ gcc_warn_check() {
 			'warning: .*\[-Wodr\]'
 			# warning: argument value A will result in undefined behaviour (Clang)
 			'warning: .*\[-Wargument-undefined-behaviour\]'
+			'warning: .*\[-Wnull-dereference\]'
 
 			# general sensible warnings (will be rejected by modern compilers soon)
+			'warning: .*\[-Wmain\]'
 			'warning: .*\[-Wimplicit-int\]'
+			'warning: .*\[-Wstring-compare\]'
 
 			# this may be valid code :/
 			#': warning: multi-character character constant'


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/install-qa-check.d/
@ 2024-02-25  8:15 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-02-25  8:15 UTC (permalink / raw
  To: gentoo-commits

commit:     9a06b7210562b8d03577cd4043227ea2023db1f2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 25 08:13:28 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 25 08:15:18 2024 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=9a06b721

bin/install-qa-check.d: 90gcc-warnings: drop GCC warnings with known (heavy) FPs

Drop -Wstringop-overflow, -Wstringop-overread, -Wstringop-truncation, -Waddress,
and -Wreturn-local-addr for now because they cause too many FPs.

We want only reliable warnings for this Portage QA check as we encourage people
to report these upstream.

Bug: https://gcc.gnu.org/PR88443
Bug: https://gcc.gnu.org/PR88781
Bug: https://gcc.gnu.org/PR93644
Bug: https://gcc.gnu.org/PR97048
Bug: https://gcc.gnu.org/PR103360
Bug: https://bugs.gentoo.org/925460
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                                  |  2 ++
 bin/install-qa-check.d/90gcc-warnings | 18 ++++++++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index 94be26de84..83be372043 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ portage-3.0.63 (UNRELEASED)
 Bug fixes:
 * emerge: Skip installed packages with emptytree in depgraph selection (bug #651018).
 
+* bin/install-qa-check.d: 90gcc-warnings: drop warnings with too many FPs (bug #925460).
+
 portage-3.0.62 (2024-02-22)
 --------------
 

diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings
index 449bf23627..1060618dfa 100644
--- a/bin/install-qa-check.d/90gcc-warnings
+++ b/bin/install-qa-check.d/90gcc-warnings
@@ -44,9 +44,12 @@ gcc_warn_check() {
 			# those three do not have matching -W flags, it seems
 			'warning: .*will always overflow destination buffer'
 			# compile-time part of FORTIFY_SOURCE
-			'warning: .*\[-Wstringop-overflow\]'
-			'warning: .*\[-Wstringop-overread\]'
-			'warning: .*\[-Wstringop-truncation\]'
+			# XXX: Commented out because of gcc FPs (https://gcc.gnu.org/PR88443)
+			#'warning: .*\[-Wstringop-overflow\]'
+			# XXX: Commented out because of gcc FPs (https://gcc.gnu.org/PR97048)
+			#'warning: .*\[-Wstringop-overread\]'
+			# XXX: Commented out because of gcc FPs (https://gcc.gnu.org/PR88781)
+			#'warning: .*\[-Wstringop-truncation\]'
 			# clang-only, equivalent of -Wstringop-overflow
 			'warning: .*\[-Wfortify-source\]'
 			'warning: .*assuming pointer wraparound does not occur'
@@ -68,7 +71,8 @@ gcc_warn_check() {
 			'warning: .*function.*\[-Wpointer-arith\]'
 			# the address of ... will never be NULL and likes
 			# (uses of function refs & string constants in conditionals)
-			'warning: .*\[-Waddress\]'
+			# XXX: Commented out because of gcc FPs (https://gcc.gnu.org/PR103360)
+			#'warning: .*\[-Waddress\]'
 
 			# TODO: we want to enable these but bash currently triggers
 			# them with a trick in random.c where it intentionally wants
@@ -95,7 +99,8 @@ gcc_warn_check() {
 			'warning: .*matching.*\[-Wformat=\]'
 
 			# function returns address of local variable
-			'warning: .*\[-Wreturn-local-addr\]'
+			# XXX: Commented out for bug #925460 (https://gcc.gnu.org/PR93644)
+			#'warning: .*\[-Wreturn-local-addr\]'
 			# missing return at end of function, or non-void return in a void function
 			# (clang at least aggressively optimises on this)
 			'warning: .*\[-Wreturn-type\]'
@@ -123,7 +128,8 @@ gcc_warn_check() {
 			'warning: .*\[-Wodr\]'
 			# warning: argument value A will result in undefined behaviour (Clang)
 			'warning: .*\[-Wargument-undefined-behaviour\]'
-			'warning: .*\[-Wnull-dereference\]'
+			# XXX: Commented out because of GCC FPs (https://gcc.gnu.org/PR86172)
+			#'warning: .*\[-Wnull-dereference\]'
 
 			# general sensible warnings (will be rejected by modern compilers soon)
 			'warning: .*\[-Wmain\]'


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-25  8:15 UTC | newest]

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox