/** Decode an option's set of keys.
*
* \param option option being decoded.
- * \paran keys array of valid subarguments.
+ * \param keys array of valid subarguments.
* \param values array of corresponding (int) values.
- * \param flag the flags to update
+ * \param flags the flags to update
* \param args colon separated list of effective subarguments to decode.
* If 0, then activate all the flags.
*
*flags = 0;
else
*flags |= value;
- args = strtok (NULL, ",");
+ args = strtok (NULL, ",");
}
}
else
/** Decode a set of sub arguments.
*
* \param FlagName the flag familly to update.
- * \param args the effective sub arguments to decode.
+ * \param Args the effective sub arguments to decode.
*
* \arg FlagName_args the list of keys.
* \arg FlagName_types the list of values.
{
/* In a series of synonyms, present the most meaningful first, so
that argmatch_valid be more readable. */
- "none - no warnings",
- "error - warnings are errors",
- "yacc - incompatibilities with POSIX YACC",
- "all - all of the above",
+ "none - no warnings",
+ "midrule-values - unset or unused midrule values",
+ "yacc - incompatibilities with POSIX YACC",
+ "all - all of the above",
+ "error - warnings are errors",
0
};
static const int warnings_types[] =
{
warnings_none,
- warnings_error,
+ warnings_midrule_values,
warnings_yacc,
- warnings_all
+ warnings_all,
+ warnings_error
};
ARGMATCH_VERIFY (warnings_args, warnings_types);
/* Here, the -g and --graph=FILE options are differentiated. */
graph_flag = true;
if (optarg)
- spec_graph_file = AS_FILE_NAME (optarg);
+ spec_graph_file = xstrdup (AS_FILE_NAME (optarg));
break;
case 'h':
/* Here, the -d and --defines options are differentiated. */
defines_flag = true;
if (optarg)
- spec_defines_file = AS_FILE_NAME (optarg);
+ spec_defines_file = xstrdup (AS_FILE_NAME (optarg));
break;
case 'k':
break;
case 'W':
- FLAGS_ARGMATCH (warnings, optarg);
+ if (optarg)
+ FLAGS_ARGMATCH (warnings, optarg);
+ else
+ warnings_flag |= warnings_all;
break;
case LOCATIONS_OPTION: