[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] basename: mention that the -s option implies -a in usage
From: |
Pádraig Brady |
Subject: |
Re: [PATCH] basename: mention that the -s option implies -a in usage |
Date: |
Wed, 26 Mar 2014 10:09:21 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 03/25/2014 10:41 PM, Bernhard Voelker wrote:
> * src/basename.c (usage): Mention that -s implies -a.
> (main): Add "fall through" comment to case 's'.
>
> Spotted by coverity: MISSING_BREAK.
> ---
> src/basename.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/basename.c b/src/basename.c
> index c34ec6c..05c5c77 100644
> --- a/src/basename.c
> +++ b/src/basename.c
> @@ -59,7 +59,7 @@ If specified, also remove a trailing SUFFIX.\n\
>
> fputs (_("\
> -a, --multiple support multiple arguments and treat each as a NAME\n\
> - -s, --suffix=SUFFIX remove a trailing SUFFIX\n\
> + -s, --suffix=SUFFIX remove a trailing SUFFIX; implies -a\n\
> -z, --zero separate output with NUL rather than newline\n\
> "), stdout);
> fputs (HELP_OPTION_DESCRIPTION, stdout);
> @@ -146,6 +146,7 @@ main (int argc, char **argv)
> {
> case 's':
> suffix = optarg;
> + /* Fall through: -s implies -a. */
>
> case 'a':
> multiple_names = true;
>
Cool you must be running some static analysis.
I've just removed this from my own "misc fixes" branch.
please push
thanks,
Pádraig.