FreeBSD Bugzilla – Attachment 242930 Details for
Bug 272136
textproc/discount: fix build with clang 16
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
textproc/discount: fix build with clang 16
textproc__discount-fix-clang16-build-1.diff (text/plain), 1.67 KB, created by
Dimitry Andric
on 2023-06-21 19:29:24 UTC
(
hide
)
Description:
textproc/discount: fix build with clang 16
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2023-06-21 19:29:24 UTC
Size:
1.67 KB
patch
obsolete
>commit 5de8c9f2884f6848c4d5fbb5a1c844c875ca353b >Author: Dimitry Andric <dim@FreeBSD.org> >Date: 2023-06-21 21:24:10 +0200 > > textproc/discount: fix build with clang 16 > > Clang 16 has a new error about incompatible function types, which shows > up when textproc/discount: > > main.c:311:29: error: incompatible function pointer types passing 'char *(char *, int, char *)' to parameter of type 'mkd_callback_t' (aka 'char *(*)(const char *, const int, void *)') [-Wincompatible-function-pointer-types] > mkd_e_code_format(doc, external_codefmt); > ^~~~~~~~~~~~~~~~ > ./mkdio.h:71:45: note: passing argument to parameter here > void mkd_e_code_format(void*, mkd_callback_t); > ^ > > This is is because the callback function's prototype does not match the > mkd_callback_t type. The program is rather sloppy with how it passes > parameters around, and just before this particular callback assignment > it casts the parameter to the desired type, so also do that here. > >diff --git a/textproc/discount/files/patch-main.c b/textproc/discount/files/patch-main.c >new file mode 100644 >index 000000000000..c16d5f6fae9f >--- /dev/null >+++ b/textproc/discount/files/patch-main.c >@@ -0,0 +1,11 @@ >+--- main.c.orig 2022-03-30 19:34:50 UTC >++++ main.c >+@@ -308,7 +308,7 @@ main(int argc, char **argv) >+ if ( squash ) >+ mkd_e_anchor(doc, (mkd_callback_t) anchor_format); >+ if ( use_e_codefmt ) >+- mkd_e_code_format(doc, external_codefmt); >++ mkd_e_code_format(doc, (mkd_callback_t) external_codefmt); >+ >+ if ( use_e_codefmt || squash ) >+ mkd_e_free(doc, free_it);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272136
: 242930