From patchwork Thu Dec 5 15:44:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36540 Received: (qmail 65565 invoked by alias); 5 Dec 2019 15:45:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 65038 invoked by uid 89); 5 Dec 2019 15:45:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Dec 2019 15:45:09 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 0726C2050A; Thu, 5 Dec 2019 10:45:04 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id B95672095B for ; Thu, 5 Dec 2019 10:44:59 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id B017328174 for ; Thu, 5 Dec 2019 10:44:59 -0500 (EST) X-Gerrit-PatchSet: 1 Date: Thu, 5 Dec 2019 10:44:59 -0500 From: "Tom Tromey (Code Review)" To: gdb-patches@sourceware.org Message-ID: Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: [review] Accept -Wno- prefix in ARI X-Gerrit-Change-Id: I6919faedf920e857df4f597df66f0ba3943e0eac X-Gerrit-Change-Number: 750 X-Gerrit-ChangeURL: X-Gerrit-Commit: 4189cef85e30445fc4eeb49bb9d0121a8e0ea061 References: Reply-To: tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/750 ...................................................................... Accept -Wno- prefix in ARI This adds -Wno- support to ARI, so that warnings can be disabled selectively. I use this to ignore "deprecated" warnings. gdb/ChangeLog 2019-12-05 Tom Tromey * contrib/ari/gdb_ari.sh: Handle -Wno- prefix. Change-Id: I6919faedf920e857df4f597df66f0ba3943e0eac --- M gdb/ChangeLog M gdb/contrib/ari/gdb_ari.sh 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3c7e592..af815fc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2019-12-05 Tom Tromey + * contrib/ari/gdb_ari.sh: Handle -Wno- prefix. + +2019-12-05 Tom Tromey + * contrib/ari/gdb_ari.sh (usage): Use GNU style. 2019-12-05 Tom Tromey diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh index 5b74506..57ec9d3 100755 --- a/gdb/contrib/ari/gdb_ari.sh +++ b/gdb/contrib/ari/gdb_ari.sh @@ -60,7 +60,8 @@ -Werror Treat all problems as errors. -Wall Report all problems. -Wari Report problems that should be fixed in new code. - -WCATEGORY Report problems in the specifed category. Valid categories + -WCATEGORY Report problems in the specifed category. The category + can be prefixed with "no-". Valid categories are: ${all} EOF exit 1 @@ -102,6 +103,10 @@ # Validate all errors and warnings. for w in ${warning} ${error} do + case "$w" in + no-*) w=`echo x$w | sed -e 's/xno-//'`;; + esac + case " ${all} " in *" ${w} "* ) ;; * ) usage "Unknown option -W${w}" ;; @@ -123,11 +128,19 @@ done for w in ${warning} do - warnings="${warnings} warning[ari_${w}] = 1;" + val=1 + case "$w" in + no-*) w=`echo x$w | sed -e 's/xno-//'`; val=0 ;; + esac + warnings="${warnings} warning[ari_${w}] = $val;" done for e in ${error} do - errors="${errors} error[ari_${e}] = 1;" + val=1 + case "$e" in + no-*) e=`echo x$e | sed -e 's/xno-//'`; val=0 ;; + esac + errors="${errors} error[ari_${e}] = $val;" done if [ "$AWK" = "" ] ; then