Accept -Wno- prefix in ARI
[deliverable/binutils-gdb.git] / gdb / contrib / ari / gdb_ari.sh
index ee9f16a8ddd4e979e9998e33cfffd9e1108048b0..02c3647388ccfe30368dc4f62815a1004b5e25d4 100755 (executable)
@@ -52,7 +52,7 @@ usage ()
 Error: $1
 
 Usage:
-    $0 --print-doc --print-idx -Wall -Werror -W<category> <file> ...
+    $0 --print-doc --print-idx -Wall -Werror -WCATEGORY FILE ...
 Options:
   --print-doc    Print a list of all potential problems, then exit.
   --print-idx    Include the problems IDX (index or key) in every message.
@@ -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.
-  -W<category>   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
@@ -581,17 +594,6 @@ Do not use `long long'\'', instead use LONGEST"
     fail("long long")
 }
 
-BEGIN { doc["ATTRIBUTE_UNUSED"] = "\
-Do not use ATTRIBUTE_UNUSED, do not bother (GDB is compiled with -Werror and, \
-consequently, is not able to tolerate false warnings.  Since -Wunused-param \
-produces such warnings, neither that warning flag nor ATTRIBUTE_UNUSED \
-are used by GDB"
-    category["ATTRIBUTE_UNUSED"] = ari_regression
-}
-/(^|[^_[:alnum:]])ATTRIBUTE_UNUSED([^_[:alnum:]]|$)/ {
-    fail("ATTRIBUTE_UNUSED")
-}
-
 BEGIN { doc["ATTR_FORMAT"] = "\
 Do not use ATTR_FORMAT, use ATTRIBUTE_PRINTF instead"
     category["ATTR_FORMAT"] = ari_regression
@@ -658,7 +660,6 @@ FNR == 1 {
 BEGIN { doc["abort"] = "\
 Do not use abort, instead use internal_error; GDB should never abort"
     category["abort"] = ari_regression
-    fix("abort", "gdb/utils.c", 3)
 }
 /(^|[^_[:alnum:]])abort[[:space:]]*\(/ {
     fail("abort")
@@ -822,7 +823,6 @@ get_frame_locals_address, or get_frame_args_address."
 BEGIN { doc["floatformat_to_double"] = "\
 Do not use floatformat_to_double() from libierty, \
 instead use floatformat_to_doublest()"
-    fix("floatformat_to_double", "gdb/doublest.c", 1)
     category["floatformat_to_double"] = ari_regression
 }
 /(^|[^_[:alnum:]])floatformat_to_double[[:space:]]*\(/ {
@@ -831,7 +831,7 @@ instead use floatformat_to_doublest()"
 
 BEGIN { doc["floatformat_from_double"] = "\
 Do not use floatformat_from_double() from libierty, \
-instead use floatformat_from_doublest()"
+instead use host_float_ops<T>::from_target()"
     category["floatformat_from_double"] = ari_regression
 }
 /(^|[^_[:alnum:]])floatformat_from_double[[:space:]]*\(/ {
This page took 0.025772 seconds and 4 git commands to generate.