[PATCH 1/2] CLI/reply: use static const for reply_to_map

Subject: [PATCH 1/2] CLI/reply: use static const for reply_to_map

Date: Wed, 17 Jun 2026 21:25:41 +0200

To: notmuch@notmuchmail.org

Cc: Dick Marinus

From: Dick Marinus


It's recommended to store these functions in a const struct, for some
reason I even got a segmentation fault without this.
---
 notmuch-reply.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/notmuch-reply.c b/notmuch-reply.c
index 44297251d..c72ca227e 100644
--- a/notmuch-reply.c
+++ b/notmuch-reply.c
@@ -329,7 +329,7 @@ add_recipients_from_message (GMimeMessage *reply,
 			     GMimeMessage *message,
 			     bool reply_all)
 {
-    struct {
+    static const struct {
 	InternetAddressList * (*get_header)(GMimeMessage *message);
 	GMimeAddressType recipient_type;
     } reply_to_map[] = {
-- 
2.54.0

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: