aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-08-25 09:09:47 +0000
committerWerner Koch <[email protected]>2022-03-09 13:03:03 +0000
commite8b1ab1d2d22f938b3e5991343b7e089d96606a0 (patch)
tree1a9bab5b069218fd898a3eb00e54e21386843e8e
parentsm: Fix parsing encrypted data. (diff)
downloadgnupg-e8b1ab1d2d22f938b3e5991343b7e089d96606a0.tar.gz
gnupg-e8b1ab1d2d22f938b3e5991343b7e089d96606a0.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 <[email protected]> (cherry picked from commit ad1254b59d41e127879fc9f495d392316135b4a5) GnuPG-bug-id: 5874
-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 ad3e8d729..fa1a7dc61 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -1914,8 +1914,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 (gnupg_argparser (&pargs, opt_table, config_name))
{