Re: [PATCH] Add a simple option parser.
On Wed, Oct 03, 2007 at 09:45:01PM +0000, Kristian Høgsberg wrote:
Show 6 quoted lines
> +static int parse_one(const char **argv,
> + struct option *options, int count,
> + const char *usage_string)
> +{
> + const char *eq, *arg, *value;
> + int i, processed; gcc complains processed could be returned without being initialized
first, so should be processed = 0; Even if it cannot occurs, it avoid
raising eyebrows.
> + case OPTION_INTEGER:
> + if (value == NULL) {
> + error("option %s requires a value.", argv); ^^^
should probably be arg.--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org