diff options
author | Jim Meyering <jim@meyering.net> | 1996-11-23 02:34:31 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-11-23 02:34:31 +0000 |
commit | 38da840313efebc6b834cc82cc6dc397344c54b3 (patch) | |
tree | 26fbdd2bb090dd16e26e67b84379cb38e49475b9 /src | |
parent | b36e061e8a332941af6d135334e64393c6910db0 (diff) | |
download | coreutils-38da840313efebc6b834cc82cc6dc397344c54b3.tar.xz |
(main): Warn if excess arguments are ignored.
E.g., printf foo bar now ignores the single non-format argument, bar.
Diffstat (limited to 'src')
-rw-r--r-- | src/printf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/printf.c b/src/printf.c index da24106a9..7ac13a5d6 100644 --- a/src/printf.c +++ b/src/printf.c @@ -160,6 +160,9 @@ main (int argc, char **argv) } while (args_used > 0 && argc > 0); + if (argc > 0) + error (0, 0, _("warning: excess arguments have been ignored")); + exit (exit_status); } |