Date: Mon, 11 Jan 2021 05:54:30 GMT From: Ryan Libby <rlibby@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c14e17a49cdd - main - dtrace tests: fix prototypes for gcc build Message-ID: <202101110554.10B5sUTt070698@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=c14e17a49cdd72c8c05d12fbec631c409b14b9cb commit c14e17a49cdd72c8c05d12fbec631c409b14b9cb Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2021-01-11 05:53:15 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2021-01-11 05:53:15 +0000 dtrace tests: fix prototypes for gcc build - quiet -Wstrict-prototypes - provide prototypes for weak aliases Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28036 --- .../cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c | 2 +- .../opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c | 2 +- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c | 5 +++-- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c | 6 ++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c index 965ad72278a1..ddbbae619aeb 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c @@ -41,7 +41,7 @@ f2(f func, int i) } int -main() +main(void) { f2(f1, 3); diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c index 7fe7b16d1d78..7786d58a4c65 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c @@ -66,7 +66,7 @@ fN2(f func, char *a, int i __unused) } int -main() +main(void) { /* * Avoid length of 1, 2, 4, or 8 bytes so DTrace will treat the data as diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c index 5680f2e177f6..d9b7f5a184a2 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c @@ -33,8 +33,7 @@ * leading underscores. */ -#pragma weak _go = go - +extern int _go(int); int go(int); int @@ -57,3 +56,5 @@ main(void) for (;;) getpid(); } + +#pragma weak _go = go diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c index 24a28420f3ef..49f486a460a3 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c @@ -33,14 +33,14 @@ * leading underscores. */ +extern int _go(int); + static int __unused go(int a) { return (a + 1); } -#pragma weak _go = go - static void handle(int sig __unused) { @@ -55,3 +55,5 @@ main(void) for (;;) getpid(); } + +#pragma weak _go = go
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101110554.10B5sUTt070698>