From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 0A5E56DE1403 for ; Wed, 1 May 2019 22:17:14 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.691 X-Spam-Level: X-Spam-Status: No, score=0.691 tagged_above=-999 required=5 tests=[AWL=-1.056, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_ABUSE_SURBL=1.948] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YvcoH3YOkB9l for ; Wed, 1 May 2019 22:17:13 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id 390D76DE1309 for ; Wed, 1 May 2019 22:17:11 -0700 (PDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1556774229; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=MTrJJvzIM+/Bvooxy/qIr11sdScKITig5C/loagZnKo=; b=sEvOpc28vlxLyEb5MVgNIm/gumqYLxcDytpLU7f4ZmiCaDF5F+5R3Ekg hql7ODElkfL48IPML3lscvrSCQ8XBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1556774228; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=MTrJJvzIM+/Bvooxy/qIr11sdScKITig5C/loagZnKo=; b=pCBBbfQJAolFaaquzXqCUAM/T/KbFxLI9edtiyjACS/sxUwdyYJBBYFP FQlviB042iC2F/tz0DpHBNCI7igTKnuq2FKY79b1qRdvPU7W5jSM9a9jlG zZOFzf9p3UlB9SojnwYmK2bdVj0AAVB5h7IIhZTicpniTFyeuxN9LM9NMV TEEkwjLvogvHZZdcrV170HrQYRx4PClU6+IgNtRuEcke0ubF8KRCOfqvYn zFqe+HRoj/dTXIpR6/7WAHr9duZgMeeAz/ws+/XgIXTNE0R9qsIdG0tDCD CrbPT0jLs6683G4DNw5nrhPxMq95+FdyyLnvdTWCz4/HLocoPagAkg== Received: from fifthhorseman.net (unknown [IPv6:2001:470:1f07:60d:4864:1fff:fe17:5aa8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id 9DC17F9A0 for ; Thu, 2 May 2019 01:17:08 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 7A05620E20; Thu, 2 May 2019 01:17:04 -0400 (EDT) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH 12/16] gmime-cleanup: pass NULL arguments explicitly where GMime 3.0 expects it Date: Thu, 2 May 2019 01:16:49 -0400 Message-Id: <20190502051653.8502-13-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190502051653.8502-1-dkg@fifthhorseman.net> References: <20190501104643.5836-1-david@tethera.net> <20190502051653.8502-1-dkg@fifthhorseman.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 May 2019 05:17:14 -0000 Signed-off-by: Daniel Kahn Gillmor --- lib/message-file.c | 4 ++-- lib/thread.cc | 2 +- mime-node.c | 2 +- notmuch-reply.c | 10 +++++----- notmuch-search.c | 4 ++-- notmuch-show.c | 4 ++-- util/gmime-extra.h | 7 ------- 7 files changed, 13 insertions(+), 20 deletions(-) diff --git a/lib/message-file.c b/lib/message-file.c index 214f3c1d..c507ee34 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -212,7 +212,7 @@ static char * _extend_header (char *combined, const char *value) { char *decoded; - decoded = g_mime_utils_header_decode_text (value); + decoded = g_mime_utils_header_decode_text (NULL, value); if (! decoded) { if (combined) { g_free (combined); @@ -296,7 +296,7 @@ _notmuch_message_file_get_header (notmuch_message_file_t *message, value = g_mime_object_get_header (GMIME_OBJECT (message->message), header); if (value) - decoded = g_mime_utils_header_decode_text (value); + decoded = g_mime_utils_header_decode_text (NULL, value); else decoded = g_strdup (""); } diff --git a/lib/thread.cc b/lib/thread.cc index 47c90664..c9c9398f 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@ -284,7 +284,7 @@ _thread_add_message (notmuch_thread_t *thread, from = notmuch_message_get_header (message, "from"); if (from) - list = internet_address_list_parse_string (from); + list = internet_address_list_parse (NULL, from); if (list) { address = internet_address_list_get_address (list, 0); diff --git a/mime-node.c b/mime-node.c index ffd116ef..4b9734f3 100644 --- a/mime-node.c +++ b/mime-node.c @@ -176,7 +176,7 @@ node_verify (mime_node_t *node, GMimeObject *part) node->verify_attempted = true; node->sig_list = g_mime_multipart_signed_verify - (GMIME_MULTIPART_SIGNED (part), cryptoctx, &err); + (GMIME_MULTIPART_SIGNED (part), GMIME_ENCRYPT_NONE, &err); if (node->sig_list) set_signature_list_destructor (node); diff --git a/notmuch-reply.c b/notmuch-reply.c index a8bb3929..5faae494 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -28,7 +28,7 @@ static void show_reply_headers (GMimeStream *stream, GMimeMessage *message) { /* Output RFC 2822 formatted (and RFC 2047 encoded) headers. */ - if (g_mime_object_write_to_stream (GMIME_OBJECT(message), stream) < 0) { + if (g_mime_object_write_to_stream (GMIME_OBJECT(message), NULL, stream) < 0) { INTERNAL_ERROR("failed to write headers to stdout\n"); } } @@ -547,7 +547,7 @@ create_reply_message(void *ctx, in_reply_to = talloc_asprintf (ctx, "<%s>", notmuch_message_get_message_id (message)); - g_mime_object_set_header (GMIME_OBJECT (reply), "In-Reply-To", in_reply_to); + g_mime_object_set_header (GMIME_OBJECT (reply), "In-Reply-To", in_reply_to, NULL); orig_references = notmuch_message_get_header (message, "references"); if (orig_references && *orig_references) @@ -556,7 +556,7 @@ create_reply_message(void *ctx, else references = talloc_strdup (ctx, in_reply_to); - g_mime_object_set_header (GMIME_OBJECT (reply), "References", references); + g_mime_object_set_header (GMIME_OBJECT (reply), "References", references, NULL); from_addr = add_recipients_from_message (reply, config, mime_message, reply_all); @@ -595,13 +595,13 @@ create_reply_message(void *ctx, from_addr = talloc_asprintf (ctx, "%s <%s>", notmuch_config_get_user_name (config), from_addr); - g_mime_object_set_header (GMIME_OBJECT (reply), "From", from_addr); + g_mime_object_set_header (GMIME_OBJECT (reply), "From", from_addr, NULL); subject = notmuch_message_get_header (message, "subject"); if (subject) { if (strncasecmp (subject, "Re:", 3)) subject = talloc_asprintf (ctx, "Re: %s", subject); - g_mime_message_set_subject (reply, subject); + g_mime_message_set_subject (reply, subject, NULL); } return reply; diff --git a/notmuch-search.c b/notmuch-search.c index 8f467db4..e2dee418 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -364,7 +364,7 @@ print_mailbox (const search_context_t *ctx, const mailbox_t *mailbox) /* name_addr has the name part quoted if necessary. Compare * 'John Doe ' vs. '"Doe, John" ' */ - name_addr = internet_address_to_string (ia, false); + name_addr = internet_address_to_string (ia, NULL, false); if (format->is_text_printer) { if (ctx->output & OUTPUT_COUNT) { @@ -446,7 +446,7 @@ process_address_header (const search_context_t *ctx, const char *value) if (value == NULL) return; - list = internet_address_list_parse_string (value); + list = internet_address_list_parse (NULL, value); if (list == NULL) return; diff --git a/notmuch-show.c b/notmuch-show.c index 90f6d815..ca4329f1 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -146,7 +146,7 @@ _extract_email_address (const void *ctx, const char *from) InternetAddressMailbox *mailbox; const char *email = "MAILER-DAEMON"; - addresses = internet_address_list_parse_string (from); + addresses = internet_address_list_parse (NULL, from); /* Bail if there is no address here. */ if (addresses == NULL || internet_address_list_length (addresses) < 1) @@ -862,7 +862,7 @@ format_part_raw (unused (const void *ctx), unused (sprinter_t *sp), * encapsulating part's headers). For multipart parts, * this will include the headers. */ if (stream_filter) - g_mime_object_write_to_stream (node->part, stream_filter); + g_mime_object_write_to_stream (node->part, NULL, stream_filter); } if (stream_filter) diff --git a/util/gmime-extra.h b/util/gmime-extra.h index e6ba45b6..d2636b78 100644 --- a/util/gmime-extra.h +++ b/util/gmime-extra.h @@ -9,14 +9,7 @@ extern "C" { GMimeStream *g_mime_stream_stdout_new(void); -#define g_mime_message_set_subject(m,s) g_mime_message_set_subject(m,s,NULL) -#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 ()) -#define g_mime_utils_header_decode_text(txt) g_mime_utils_header_decode_text (NULL, txt) -#define internet_address_to_string(ia,encode) internet_address_to_string (ia,NULL,encode) -#define internet_address_list_parse_string(str) internet_address_list_parse (NULL,str) /** * Get last 16 hex digits of fingerprint ("keyid") -- 2.20.1