git: de5264ca78f4 - main - mail/mutt: fix build with clang 15
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 07 Dec 2022 15:35:18 UTC
The branch main has been updated by dim (src committer):
URL: https://cgit.FreeBSD.org/ports/commit/?id=de5264ca78f41c04c1753ca94d949121b53b9f1d
commit de5264ca78f41c04c1753ca94d949121b53b9f1d
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-12-06 20:53:39 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-12-07 15:34:04 +0000
mail/mutt: fix build with clang 15
During an exp-run for llvm 15 (see bug 265425), it turned out that
mail/mutt failed to build with clang (and lld) 15:
--- init.o ---
In file included from init.c:43:
./init.h:3166:37: error: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversion]
{ "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 },
^~~~~~~~~~~~~
./init.h:3166:37: warning: suggest braces around initialization of subobject [-Wmissing-braces]
{ "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 },
^~~~~~~~~~~~~
{ }
./init.h:3166:52: error: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversion]
{ "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 },
^
./init.h:3166:52: warning: suggest braces around initialization of subobject [-Wmissing-braces]
{ "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 },
^
This is because the QUOTE_PATCH option is on by default, and that quote
patch does not properly initialize the union members for the MuttVars
variable.
PR: 268208
Approved by: dereks@lifeofadishwasher.com (maintainer)
MFH: 2022Q4
---
mail/mutt/Makefile | 1 +
mail/mutt/files/extra-patch-quote | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile
index 30e700b51515..b9e02a9a8c0e 100644
--- a/mail/mutt/Makefile
+++ b/mail/mutt/Makefile
@@ -173,6 +173,7 @@ NLS_CONFIGURE_ENABLE= nls
QUOTE_PATCH_PATCHFILES= patch-${VVV_PATCH_VERSION}.vvv.initials.xz:vvv \
mutt-${GREETING_PATCH_VERSION}.vvv.quote:vc
+QUOTE_PATCH_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-quote
REVERSE_REPLY_PATCH_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-reverse_reply
diff --git a/mail/mutt/files/extra-patch-quote b/mail/mutt/files/extra-patch-quote
new file mode 100644
index 000000000000..33dc9010ae03
--- /dev/null
+++ b/mail/mutt/files/extra-patch-quote
@@ -0,0 +1,18 @@
+--- init.h.orig 2022-09-14 14:12:12 UTC
++++ init.h
+@@ -3163,13 +3163,13 @@ struct option_t MuttVars[] = {
+ ** have no effect, and if it is set to \fIask-yes\fP or \fIask-no\fP, you are
+ ** prompted for confirmation when you try to quit.
+ */
+- { "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 },
++ { "quote_empty", DT_BOOL, R_NONE, {.l=OPTQUOTEEMPTY}, {.l=1} },
+ /*
+ ** .pp
+ ** Controls whether or not empty lines will be quoted using
+ ** ``$indent_string''.
+ */
+- { "quote_quoted", DT_BOOL, R_NONE, OPTQUOTEQUOTED, 0 },
++ { "quote_quoted", DT_BOOL, R_NONE, {.l=OPTQUOTEQUOTED}, {.l=0} },
+ /*
+ ** .pp
+ ** Controls how quoted lines will be quoted. If set, one quote