1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg: Fix harmless compiler warnings.

* g10/tofu.h (_tofu_GET_POLICY_ERROR): New.  This avoids warnings
about undefined enum values in a switch.
* g10/trustdb.h (_tofu_GET_TRUST_ERROR): New.
* g10/tofu.c (TIME_AGO_FUTURE_IGNORE): Move to the top.
(opendbs): Avoid compiler warning (use braces).
(GET_POLICY_ERROR): Replace define by enum _tofu_GET_POLICY_ERROR.
(get_policy): Remove assert.
(GET_TRUST_ERROR): Replace by _tofu_GET_TRUST_ERROR macro.
(show_statistics): Undef MIN_SECS et al. after use.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-10-18 20:07:26 +02:00
parent e64c805b0c
commit 558bcd43ae
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 74 additions and 67 deletions

View file

@ -36,6 +36,11 @@
#define TRUST_FLAG_DISABLED 128 /* d: key/uid disabled */
#define TRUST_FLAG_PENDING_CHECK 256 /* a check-trustdb is pending */
/* Private value used in tofu.c - must be different from the trust
values. */
#define _tofu_GET_TRUST_ERROR 100
/* Length of the hash used to select UIDs in keyedit.c. */
#define NAMEHASH_LEN 20