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 305E71580EB for ; Fri, 30 May 2025 07:37:46 +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 1E99D343111 for ; Fri, 30 May 2025 07:37:46 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 976EF110497; Fri, 30 May 2025 07:37:39 +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 8EED6110497 for ; Fri, 30 May 2025 07:37:39 +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 4DB1934308D for ; Fri, 30 May 2025 07:37:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E7BD428EB for ; Fri, 30 May 2025 07:37:37 +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: <1748590650.dc3e0c5e828b87f8af2542ff29d3d80bda37fdbd.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: dc3e0c5e828b87f8af2542ff29d3d80bda37fdbd X-VCS-Branch: master Date: Fri, 30 May 2025 07:37:37 +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: 71e5d5d1-8ed5-456a-a33c-9489e92d3f15 X-Archives-Hash: f8008db822b4e7f036ada20d5fbf58fa commit: dc3e0c5e828b87f8af2542ff29d3d80bda37fdbd Author: Kerin Millar plushkava net> AuthorDate: Thu May 22 18:28:50 2025 +0000 Commit: Sam James gentoo org> CommitDate: Fri May 30 07:37:30 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=dc3e0c5e 90gcc-warnings: simplify xtrace option handling Simplify the xtrace handling by stashing a command that restores the option's present status before unconditionally disabling it. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/install-qa-check.d/90gcc-warnings | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings index ea51f19d32..4da17b154b 100644 --- a/bin/install-qa-check.d/90gcc-warnings +++ b/bin/install-qa-check.d/90gcc-warnings @@ -3,17 +3,14 @@ # TODO: add -Wformat-security gcc_warn_check() { - local abort f grep_cmd joined_msgs reset_debug + local abort f grep_cmd joined_msgs reset_xtrace local -a msgs # Evaluate misc gcc warnings # In debug mode, this variable definition and corresponding grep calls # will produce false positives if they're shown in the trace. - reset_debug=0 - if [[ $- == *x* ]] ; then - set +x - reset_debug=1 - fi + reset_xtrace=$(shopt -o -p xtrace) + shopt -o -u xtrace msgs=( # only will and does, no might :) @@ -172,7 +169,7 @@ gcc_warn_check() { __vecho -ne '\n' fi - [[ ${reset_debug} = 1 ]] && set -x + eval "${reset_xtrace}" if [[ ${abort} == "yes" ]] ; then echo "Please do not file a Gentoo bug and instead" \