diff options
author | Kim Grasman <kim.grasman@gmail.com> | 2019-03-19 20:17:09 +0100 |
---|---|---|
committer | Kim Gräsman <kim.grasman@gmail.com> | 2019-03-23 09:49:40 +0100 |
commit | f7e19006194b28ff8d2f889e7c7937f658c8c2b1 (patch) | |
tree | 98562f60147eac7e173a2dc2e4a3c0aa84099630 | |
parent | 5e6adc81107cd5e19bc78ee8452788ea8210e882 (diff) |
Fix misspecified getopt has_arg flags
Several options were incorrectly marked with 'optional_argument', which
means they can take a value argument, but don't have to. We don't have
any options like that.
Fixes issue #663.
-rw-r--r-- | iwyu_globals.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/iwyu_globals.cc b/iwyu_globals.cc index ae6dcf0..55c4a0d 100644 --- a/iwyu_globals.cc +++ b/iwyu_globals.cc @@ -174,9 +174,9 @@ int CommandlineFlags::ParseArgv(int argc, char** argv) { {"no_default_mappings", no_argument, nullptr, 'n'}, {"prefix_header_includes", required_argument, nullptr, 'x'}, {"pch_in_code", no_argument, nullptr, 'h'}, - {"max_line_length", optional_argument, nullptr, 'l'}, - {"no_comments", optional_argument, nullptr, 'o'}, - {"no_fwd_decls", optional_argument, nullptr, 'f'}, + {"max_line_length", required_argument, nullptr, 'l'}, + {"no_comments", no_argument, nullptr, 'o'}, + {"no_fwd_decls", no_argument, nullptr, 'f'}, {"quoted_includes_first", no_argument, nullptr, 'q' }, {"cxx17ns", no_argument, nullptr, 'C'}, {nullptr, 0, nullptr, 0} |