FreeBSD Bugzilla – Attachment 238665 Details for
Bug 268277
textproc/scdoc: fix build with clang 15
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
textproc/scdoc: fix build with clang 15
textproc__scdoc-fix-clang15-build-1.diff (text/plain), 1.77 KB, created by
Dimitry Andric
on 2022-12-09 15:25:05 UTC
(
hide
)
Description:
textproc/scdoc: fix build with clang 15
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2022-12-09 15:25:05 UTC
Size:
1.77 KB
patch
obsolete
>commit a6f4978456636c06b651215a91dfb4e10a53beeb >Author: Dimitry Andric <dim@FreeBSD.org> >Date: Fri Dec 9 16:21:42 2022 +0100 > > textproc/scdoc: fix build with clang 15 > > During an exp-run for llvm 15 (see bug 265425), it turned out that > textproc/scdoc failed to build with clang 15: > > In file included from src/main.c:12: > include/str.h:10:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] > struct str *str_create(); > ^ > void > 1 error generated. > > This is because -Wstrict-prototypes now requires functions taking no > parameters to be declared with "(void)". > >diff --git a/textproc/scdoc/files/patch-include_str.h b/textproc/scdoc/files/patch-include_str.h >new file mode 100644 >index 000000000000..d043857e759d >--- /dev/null >+++ b/textproc/scdoc/files/patch-include_str.h >@@ -0,0 +1,11 @@ >+--- include/str.h.orig 2021-11-13 08:04:45 UTC >++++ include/str.h >+@@ -7,7 +7,7 @@ struct str { >+ size_t len, size; >+ }; >+ >+-struct str *str_create(); >++struct str *str_create(void); >+ void str_free(struct str *str); >+ void str_reset(struct str *str); >+ int str_append_ch(struct str *str, uint32_t ch); >diff --git a/textproc/scdoc/files/patch-src_string.c b/textproc/scdoc/files/patch-src_string.c >new file mode 100644 >index 000000000000..f92b68ef36e9 >--- /dev/null >+++ b/textproc/scdoc/files/patch-src_string.c >@@ -0,0 +1,11 @@ >+--- src/string.c.orig 2021-11-13 08:04:45 UTC >++++ src/string.c >+@@ -12,7 +12,7 @@ static void ensure_capacity(struct str *str, size_t le >+ } >+ } >+ >+-struct str *str_create() { >++struct str *str_create(void) { >+ struct str *str = xcalloc(1, sizeof(struct str)); >+ str->str = xcalloc(16, 1); >+ str->size = 16;
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 268277
: 238665