El 2023-02-11 12:45, Guido Falsi escribió:
On 11/02/23 12:12, andrew clarke wrote:
Hi José,
On 2023-02-11 08:16:16, José Pérez ([email protected]) wrote:
Hi,
I get the following error when poudriere building editors/uemacs on
...
The MicroEMACS source code was all written in vintage K&R style.
Evidently
newer versions of Clang increasingly have a problem with this, which I
guess is unsurprising since the minimum C standard Clang is designed
for is
probably C89/C90.
...
Something like -Wno-error=int-conversion or -Wno-int-conversion should
make the error go away. Same with similar issues with this code.
This patch compiles, as a workaround proposed by Guido:
diff --git a/editors/uemacs/Makefile b/editors/uemacs/Makefile
index f999cc978685..48111ffb8824 100644
--- a/editors/uemacs/Makefile
+++ b/editors/uemacs/Makefile
@@ -19,6 +19,8 @@ NO_WRKSUBDIR= yes
USES= dos2unix ncurses zip
EXTRACT_BEFORE_ARGS= -Lq
+CFLAGS+= -Wno-int-conversion
+
post-patch:
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g"
${WRKSRC}/src/*.c
@${REINPLACE_CMD} -e 's|-ltermcap|${LDFLAGS} -lncurses|g' \
I'm not advocating doing this in general. In fact patching the code to
not cause these errors should be the solution, but for old code that
is not going to change upstream, maybe disabling the warnings is the
correct fix.
Agreed. For the time being I am using the workaround, will see whether a
consistent patch can be upstreamed.
Regards,
--
José Pérez