From f5964eeffa308fe91088aeeb83ca7f2508bbc9fe Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 23 Sep 2010 20:00:39 +0200 Subject: [PATCH] dwarflint: Only toplevel option pack should have description --- dwarflint/option.cc | 8 ++++---- dwarflint/option.hh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dwarflint/option.cc b/dwarflint/option.cc index 6ac707e3e..a42e05253 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 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 5f3af6f10..1b5172c25 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 { -- 2.47.2