[PATCH 2/3] clean up use of constants in g_mime_multipart_ wrappers

Subject: [PATCH 2/3] clean up use of constants in g_mime_multipart_ wrappers

Date: Fri, 14 Jul 2017 15:12:01 +0200

To: Notmuch Mail

Cc:

From: Daniel Kahn Gillmor


When compiling as C code (instead of C++) against gmime 3.0, gcc gives
errors like the following:

    error: invalid conversion from ‘int’ to ‘GMimeDecryptFlags’ [-fpermissive]

so use explicit *_NONE values instead.
---
 util/gmime-extra.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/util/gmime-extra.h b/util/gmime-extra.h
index cf8d9a2d..8096dbe3 100644
--- a/util/gmime-extra.h
+++ b/util/gmime-extra.h
@@ -29,8 +29,8 @@ typedef GMimeAddressType GMimeRecipientType;
 #define g_mime_init(flags) g_mime_init()
 #define g_mime_message_add_recipient(m,t,n,a) g_mime_message_add_mailbox (m,t,n,a)
 #define g_mime_message_set_subject(m,s) g_mime_message_set_subject(m,s,NULL)
-#define g_mime_multipart_encrypted_decrypt(mpe,ctx,out,err) g_mime_multipart_encrypted_decrypt(mpe, 0, NULL, out, err)
-#define g_mime_multipart_signed_verify(mps,ctx,err) g_mime_multipart_signed_verify(mps, 0, err)
+#define g_mime_multipart_encrypted_decrypt(mpe,ctx,out,err) g_mime_multipart_encrypted_decrypt(mpe, GMIME_DECRYPT_NONE, NULL, out, err)
+#define g_mime_multipart_signed_verify(mps,ctx,err) g_mime_multipart_signed_verify(mps, GMIME_ENCRYPT_NONE, err)
 #define g_mime_object_write_to_stream(o,s) g_mime_object_write_to_stream (o,NULL,s)
 #define g_mime_object_set_header(o,h,v) g_mime_object_set_header (o,h,v,NULL)
 #define g_mime_parser_construct_message(p) g_mime_parser_construct_message (p, g_mime_parser_options_get_default ())
-- 
2.13.2


Thread: