diff options
| author | Petr Machata <[email protected]> | 2010-09-23 20:00:39 +0200 |
|---|---|---|
| committer | Petr Machata <[email protected]> | 2010-09-23 20:00:39 +0200 |
| commit | f5964eeffa308fe91088aeeb83ca7f2508bbc9fe (patch) | |
| tree | 7b6a8d4963b067ccc352c7939fb97751fe2b3691 /dwarflint | |
| parent | 8d8b7c1fd4ef7bb0492beb44eb646ef52bb15f85 (diff) | |
dwarflint: Only toplevel option pack should have description
Diffstat (limited to 'dwarflint')
| -rw-r--r-- | dwarflint/option.cc | 8 | ||||
| -rw-r--r-- | dwarflint/option.hh | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/dwarflint/option.cc b/dwarflint/option.cc index 6ac707e3..a42e0525 100644 --- a/dwarflint/option.cc +++ b/dwarflint/option.cc @@ -80,7 +80,7 @@ options::add (option_i *opt) const char *argp_program_bug_address = PACKAGE_BUGREPORT; argp -options::build_argp () const +options::build_argp (bool toplev) const { _m_opts.clear (); for (const_iterator it = begin (); it != end (); ++it) @@ -89,8 +89,8 @@ options::build_argp () const argp a = { &_m_opts.front (), &options::parse_opt, - "FILE...", - "\ + !toplev ? NULL : "FILE...", + !toplev ? NULL : "\ Pedantic checking of DWARF stored in ELF files.", NULL, NULL, NULL }; @@ -100,7 +100,7 @@ Pedantic checking of DWARF stored in ELF files.", argp_full::argp_full (options const &global, std::vector<checkdescriptor const *> checkdescriptors) { - argp main = global.build_argp (); + argp main = global.build_argp (true); typedef dwarflint::check_registrar::checkdescriptors_t checkdescriptors_t; for (checkdescriptors_t::const_iterator it = checkdescriptors.begin (); diff --git a/dwarflint/option.hh b/dwarflint/option.hh index 5f3af6f1..1b5172c2 100644 --- a/dwarflint/option.hh +++ b/dwarflint/option.hh @@ -47,7 +47,7 @@ class options public: option_i const *getopt (int key) const; - argp build_argp () const; + argp build_argp (bool toplev = false) const; void add (option_i *opt); bool empty () const { |
