Accept -Wno- prefix in ARI
authorTom Tromey <tromey@adacore.com>
Thu, 5 Dec 2019 15:36:31 +0000 (08:36 -0700)
committerTom Tromey <tromey@adacore.com>
Fri, 13 Dec 2019 22:15:32 +0000 (15:15 -0700)
This adds -Wno- support to ARI, so that warnings can be disabled
selectively.  I use this to ignore "deprecated" warnings.

gdb/ChangeLog
2019-12-13  Tom Tromey  <tromey@adacore.com>

* contrib/ari/gdb_ari.sh: Handle -Wno- prefix.

Change-Id: I6919faedf920e857df4f597df66f0ba3943e0eac

gdb/ChangeLog
gdb/contrib/ari/gdb_ari.sh

index 93b076279ef4acbf0e7de75d5ac4309777987bea..d30611fa269e92239fdda6f1b26c63aae90f7648 100644 (file)
@@ -1,3 +1,7 @@
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * contrib/ari/gdb_ari.sh: Handle -Wno- prefix.
+
 2019-12-13  Tom Tromey  <tromey@adacore.com>
 
        * contrib/ari/gdb_ari.sh (usage): Use GNU style.
index 4b0fddfee7d101da3e0d239a9cab16f347681bea..02c3647388ccfe30368dc4f62815a1004b5e25d4 100755 (executable)
@@ -60,7 +60,8 @@ Options:
   -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 @@ fi
 # 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 @@ do
 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
This page took 0.030597 seconds and 4 git commands to generate.