]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Only toplevel option pack should have description
authorPetr Machata <pmachata@redhat.com>
Thu, 23 Sep 2010 18:00:39 +0000 (20:00 +0200)
committerPetr Machata <pmachata@redhat.com>
Thu, 23 Sep 2010 18:00:39 +0000 (20:00 +0200)
dwarflint/option.cc
dwarflint/option.hh

index 6ac707e3ec8e9963deb043c5599cfc90a480334a..a42e05253bc0ee16a76a0c99cfeb120850d1aba8 100644 (file)
@@ -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 ();
index 5f3af6f1072bd1c3e74e5c5691ba2f734511b34d..1b5172c25e3ace2592a64609300ab60b9a833ac7 100644 (file)
@@ -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
   {