From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9AF5F1580EB for ; Fri, 30 May 2025 07:37:51 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 895CF34300E for ; Fri, 30 May 2025 07:37:51 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 0B4F41104A7; Fri, 30 May 2025 07:37:41 +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)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id EC8B31104A7 for ; Fri, 30 May 2025 07:37:40 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AA053343085 for ; Fri, 30 May 2025 07:37:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4291A28F0 for ; Fri, 30 May 2025 07:37:38 +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: <1748590651.fe82ae7743602aec01c69d5b3ed814c6edb11742.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/ X-VCS-Repository: proj/portage X-VCS-Files: 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: fe82ae7743602aec01c69d5b3ed814c6edb11742 X-VCS-Branch: master Date: Fri, 30 May 2025 07:37:38 +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: 2c0f2d12-515a-403f-8320-9ae995b125d9 X-Archives-Hash: 8f4f28322689bd08178dec85243ad433 commit: fe82ae7743602aec01c69d5b3ed814c6edb11742 Author: Kerin Millar plushkava net> AuthorDate: Thu May 22 20:13:57 2025 +0000 Commit: Sam James gentoo org> CommitDate: Fri May 30 07:37:31 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=fe82ae77 90gcc-warnings: jettison the joined_msgs variable In the course of joining the patterns to form an ERE branch, there is no need for an additional variable to store it. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/install-qa-check.d/90gcc-warnings | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings index 9ec16f1585..185deaa53a 100644 --- a/bin/install-qa-check.d/90gcc-warnings +++ b/bin/install-qa-check.d/90gcc-warnings @@ -3,7 +3,7 @@ # TODO: add -Wformat-security gcc_warn_check() { - local abort f joined_msgs reset_xtrace + local abort f reset_xtrace local -a msgs # Evaluate misc gcc warnings @@ -147,21 +147,18 @@ gcc_warn_check() { #': warning: not enough variable arguments to fit a sentinel' ) - # join all messages into one grep-expression - printf -v joined_msgs '%s|' "${msgs[@]}" - joined_msgs=${joined_msgs%|} - # Force C locale to work around slow multibyte locales, bug #160234 # Force text mode as newer grep will treat non-ASCII (e.g. UTF-8) as # binary when we run in the C locale. f=$( + IFS='|' if [[ ${PORTAGE_LOG_FILE} == *.gz ]]; then gzip -cd -- "${PORTAGE_LOG_FILE}" else cat -- "${PORTAGE_LOG_FILE}" fi \ | LC_ALL=C sed -E -e $'s/\033\[[0-9;]*[A-Za-z]//g' \ - | LC_CTYPE=C LC_COLLATE=C grep -E -a "${joined_msgs}" \ + | LC_CTYPE=C LC_COLLATE=C grep -E -a "${msgs[*]}" \ | uniq ) if [[ -n ${f} ]] ; then