Taylor Blau <me@xxxxxxxxxxxx> writes: > +static int option_parse_type(const struct option *opt, const char *arg, > + int unset) > +{ > + /* > + * To support '--<type>' style flags, begin with new_type equal to > + * opt->defval. > + */ > + int new_type = opt->defval; > + int *to_type = opt->value; > + > + if (unset) { > + *((int *) opt->value) = 0; As you moved the definition of to_type higher than the previous rounds, you can already use it here to avoid cryptic casting, i.e. *to_type = 0; no? > + return 0; > + }