From 606e320e472b486359cf7a44c488b29e717a3ac8 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 16 Jul 2017 01:01:44 +0200 Subject: [PATCH] cli/crypto: eliminated compiler warnings about unused arguments These are due to (excessively?) fancy macro definitions in gmime-extra.h --- mime-node.c | 4 ++-- util/gmime-extra.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mime-node.c b/mime-node.c index 7363e222..bc41b752 100644 --- a/mime-node.c +++ b/mime-node.c @@ -151,7 +151,7 @@ set_signature_list_destructor (mime_node_t *node) /* Verify a signed mime node (GMime 2.6) */ static void node_verify (mime_node_t *node, GMimeObject *part, - notmuch_crypto_context_t *cryptoctx) + g_mime_3_unused(notmuch_crypto_context_t *cryptoctx)) { GError *err = NULL; @@ -172,7 +172,7 @@ node_verify (mime_node_t *node, GMimeObject *part, /* Decrypt and optionally verify an encrypted mime node (GMime 2.6) */ static void node_decrypt_and_verify (mime_node_t *node, GMimeObject *part, - notmuch_crypto_context_t *cryptoctx) + g_mime_3_unused(notmuch_crypto_context_t *cryptoctx)) { GError *err = NULL; GMimeDecryptResult *decrypt_result = NULL; diff --git a/util/gmime-extra.h b/util/gmime-extra.h index 8096dbe3..de275bc1 100644 --- a/util/gmime-extra.h +++ b/util/gmime-extra.h @@ -14,6 +14,7 @@ GMimeStream *g_mime_stream_stdout_new(void); #define GMIME_ADDRESS_TYPE_BCC GMIME_RECIPIENT_TYPE_BCC #define g_mime_2_6_unref(obj) g_object_unref (obj) +#define g_mime_3_unused(arg) arg #define g_mime_certificate_get_fpr16(cert) g_mime_certificate_get_key_id (cert) #define g_mime_certificate_get_uid(cert) g_mime_certificate_get_name (cert); #else /* GMime >= 3.0 */ @@ -56,6 +57,7 @@ typedef GMimeTrust GMimeCertificateTrust; #define GMIME_CERTIFICATE_TRUST_ULTIMATE GMIME_TRUST_ULTIMATE #define g_mime_2_6_unref(obj) /*ignore*/ +#define g_mime_3_unused(arg) unused(arg) #endif /** -- 2.26.2