From: Jim Meyering Date: Sat, 23 Nov 1996 02:34:31 +0000 (+0000) Subject: (main): Warn if excess arguments are ignored. X-Git-Tag: TEXTUTILS-1_19q~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38da840313efebc6b834cc82cc6dc397344c54b3;p=thirdparty%2Fcoreutils.git (main): Warn if excess arguments are ignored. E.g., printf foo bar now ignores the single non-format argument, bar. --- diff --git a/src/printf.c b/src/printf.c index da24106a9e..7ac13a5d60 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); }