1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 03:12:48 +02:00

all: quote string arguments in error messages

These strings are often file names or other user specified
parameters, which can give confusing errors in
the presence of unexpected characters for example.

* cfg.mk (sc_error_quotes): A new syntax check rule.
* src/*.c: Wrap error() string arguments with quote().
* tests/: Adjust accordingly.
* NEWS: Mention the improvement.
This commit is contained in:
Pádraig Brady
2015-10-27 13:13:59 +00:00
parent 106d4bf159
commit 6796698c99
63 changed files with 321 additions and 269 deletions

View File

@@ -119,8 +119,8 @@ sed 's/: Invalid.*/: expected a numeric value/' err > k && mv k err
cat <<EOF > exp_err
printf: warning: ": character(s) following character constant have been ignored
printf: ": expected a numeric value
printf: a: expected a numeric value
printf: '"': expected a numeric value
printf: 'a': expected a numeric value
EOF
compare exp out || fail=1