From: Pierre Habouzit Date: Fri, 05 Oct 2007 10:08:40 GMT Subject: Re: [PATCH] Add a simple option parser. Message-ID: <20071005100840.GI19879@artemis.corp> In-Reply-To: <1191447902-27326-1-git-send-email-krh@redhat.com> On Wed, Oct 03, 2007 at 09:45:01PM +0000, Kristian Høgsberg wrote: > +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