[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] parse_long_options: after --help, avoid fallthrough into --v
From: |
Jim Meyering |
Subject: |
Re: [PATCH] parse_long_options: after --help, avoid fallthrough into --version |
Date: |
Wed, 16 Jul 2014 18:00:15 -0700 |
On Wed, Jul 16, 2014 at 3:43 PM, Bernhard Voelker
<address@hidden> wrote:
> Does anyone know of a tool using parse_long_options() which
> would rely on printing the --version text right after the usage
> text for the --help option?
No. That would be a bug.
...
> case 'h':
> (*usage_func) (EXIT_SUCCESS);
> + exit (EXIT_SUCCESS);
Does that elicit a dead-code warning, when some static analysis
tool notices the statement after an always-"noreturn" function call?
What do you think about adding the noreturn attribute to the
declaration of the usage_func parameter?