Summary: | textproc/scdoc: fix build with clang 15 | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Dimitry Andric <dim> | ||||
Component: | Individual Port(s) | Assignee: | Jan Beich <jbeich> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | Flags: | jbeich:
maintainer-feedback+
jbeich: merge-quarterly+ |
||||
Priority: | --- | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 265425 | ||||||
Attachments: |
|
Description
Dimitry Andric
2022-12-09 15:24:45 UTC
Created attachment 238665 [details]
textproc/scdoc: fix build with clang 15
Can you send the patch upstream to ~sircmpwn/public-inbox@lists.sr.ht in git-format(1) way or via git-send-email(1) ? See https://lists.sr.ht/~sircmpwn/public-inbox/patches?search=prefix%3Ascdoc for workflow examples e.g., how to format Subject line > This is because -Wstrict-prototypes now requires functions taking no parameters to be declared with "(void)". - vendor Makefile doesn't pass -Wstrict-prototypes directly, so it's probably from -Wall or -Wextra - instead of "now" referencing upstream LLVM commit may provide more insight (In reply to Jan Beich from comment #2) Well, the program attempts to compile with both -std=c99 -pedantic and -Wall -Wextra -Werror, so I assume that the authors want to check for warnings as pedantically as possible. :-) Upstream clang changed this in https://github.com/llvm/llvm-project/commit/33d3fc4466479285121cbb1a62db249454da0bda, with a whole discussion going on at https://discourse.llvm.org/t/rfc-enabling-wstrict-prototypes-by-default-in-c/60521. I'm personally not completely convinced that making these warnings errors by default is a good choice, but it was not up to me... A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d30ead133df49f67fa29fbcc5cc4be19a2ad6af4 commit d30ead133df49f67fa29fbcc5cc4be19a2ad6af4 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-12-09 15:21:42 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2022-12-09 17:32:07 +0000 textproc/scdoc: unbreak build with clang 15 In file included from src/string.c:3: 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 src/string.c:15:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] struct str *str_create() { ^ void PR: 268277 Reported by: antoine (via bug 265425 exp-run) textproc/scdoc/files/patch-clang15 (new) | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) A commit in branch 2022Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=2a57c51d01741ce7265033de6fff1b5dee6fd837 commit 2a57c51d01741ce7265033de6fff1b5dee6fd837 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-12-09 15:21:42 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2022-12-09 17:39:27 +0000 textproc/scdoc: unbreak build with clang 15 In file included from src/string.c:3: 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 src/string.c:15:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] struct str *str_create() { ^ void PR: 268277 Reported by: antoine (via bug 265425 exp-run) (cherry picked from commit d30ead133df49f67fa29fbcc5cc4be19a2ad6af4) textproc/scdoc/files/patch-clang15 (new) | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) Thanks. Landed with cosmetic changes: - dropped redundant bits from the commit message - combined patches by topic with upstream(ing) reference (which has better commit message) |