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.
-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
# 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}" ;;
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
BEGIN { doc["long long"] = "\
Do not use `long long'\'', instead use LONGEST"
category["long long"] = ari_code
- # defs.h needs two such patterns for LONGEST and ULONGEST definitions
- fix("long long", "gdb/defs.h", 2)
}
/(^|[^_[:alnum:]])long[[:space:]]+long([^_[:alnum:]]|$)/ {
fail("long long")
# General problems
-BEGIN { doc["multiple messages"] = "\
-Do not use multiple calls to warning or error, instead use a single call"
- category["multiple messages"] = ari_gettext
-}
-FNR == 1 {
- warning_fnr = -1
-}
-/(^|[^_[:alnum:]])(warning|error)[[:space:]]*\(/ {
- if (FNR == warning_fnr + 1) {
- fail("multiple messages")
- } else {
- warning_fnr = FNR
- }
-}
-
# Commented out, but left inside sources, just in case.
# BEGIN { doc["inline"] = "\
# Do not use the inline attribute; \
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")
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:]]*\(/ {
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:]]*\(/ {