summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-08-25 11:09:47 +0200
committerWerner Koch <wk@gnupg.org>2020-08-25 11:09:47 +0200
commitad1254b59d41e127879fc9f495d392316135b4a5 (patch)
treea8e4faa707b90733aca8e72c5e29f1df3343465f /tools
parentagent: Allow using --gogconf-list even if HOME does not exist. (diff)
downloadgnupg2-ad1254b59d41e127879fc9f495d392316135b4a5.tar.xz
gnupg2-ad1254b59d41e127879fc9f495d392316135b4a5.zip
gpgconf: Silence warnings from parsing the options files
* tools/gpgconf-comp.c (retrieve_options_from_program): Set verbose flag for the arg parser only in --verbose mode. -- Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/gpgconf-comp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index c905bd13a..d6cc14c28 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -1819,8 +1819,9 @@ retrieve_options_from_program (gc_component_id_t component, int only_installed)
pargs.flags = (ARGPARSE_FLAG_KEEP
| ARGPARSE_FLAG_SYS
| ARGPARSE_FLAG_USER
- | ARGPARSE_FLAG_WITHATTR
- | ARGPARSE_FLAG_VERBOSE);
+ | ARGPARSE_FLAG_WITHATTR);
+ if (opt.verbose)
+ pargs.flags |= ARGPARSE_FLAG_VERBOSE;
while (gpgrt_argparser (&pargs, opt_table, config_name))
{