Date: Sat, 23 Jul 2022 08:58:53 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: b081180259ae - stable/12 - Adjust dtmalloc_unload() definition to avoid clang 15 warning Message-ID: <202207230858.26N8wrGb013166@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b081180259aeb573b575df735fe503c9129cfbec commit b081180259aeb573b575df735fe503c9129cfbec Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-19 18:24:41 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-23 08:57:41 +0000 Adjust dtmalloc_unload() definition to avoid clang 15 warning With clang 15, the following -Werror warnings is produced: sys/cddl/dev/dtmalloc/dtmalloc.c:177:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] dtmalloc_unload() ^ void This is because dtmalloc_unload() is declared with a (void) argument list, but defined with an empty argument list. Make the definition match the declaration. MFC after: 3 days (cherry picked from commit a0c55bac79ef684db5f3645fdc1e0fd8da827985) --- sys/cddl/dev/dtmalloc/dtmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cddl/dev/dtmalloc/dtmalloc.c b/sys/cddl/dev/dtmalloc/dtmalloc.c index 49516a27a635..3a6cad6c939a 100644 --- a/sys/cddl/dev/dtmalloc/dtmalloc.c +++ b/sys/cddl/dev/dtmalloc/dtmalloc.c @@ -186,7 +186,7 @@ dtmalloc_load(void *dummy) static int -dtmalloc_unload() +dtmalloc_unload(void) { int error = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207230858.26N8wrGb013166>