Author: markj Date: Sat Sep 19 16:15:22 2020 New Revision: 365907 URL: https://svnweb.freebsd.org/changeset/base/365907
Log: Address compiler warnings in C code used by the DTrace test suite. Reported by: Jenkins MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/arrays/tst.rax.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/arrays/tst.rax.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/arrays/tst.rax.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/arrays/tst.rax.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,6 +24,8 @@ * Use is subject to license terms. */ +void frax(void); + __attribute__((optnone)) void frax(void) { Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/ioctl.h> #include <assert.h> @@ -48,7 +46,8 @@ int main(int argc, char *argv[]) { const char *file = "/dev/null"; - int i, n, fds[10]; + size_t i, n; + int fds[10]; struct sigaction act; if (argc > 1) { Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> typedef void f(int x); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,43 +24,43 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +#include <sys/cdefs.h> typedef void f(char *); static void -f_a(char *a) +f_a(char *a __unused) { } static void -f_b(char *a) +f_b(char *a __unused) { } static void -f_c(char *a) +f_c(char *a __unused) { } static void -f_d(char *a) +f_d(char *a __unused) { } static void -f_e(char *a) +f_e(char *a __unused) { } static void -fN(f func, char *a, int i) +fN(f func, char *a, int i __unused) { func(a); } static void -fN2(f func, char *a, int i) +fN2(f func, char *a, int i __unused) { func(a); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c Sat Sep 19 16:15:22 2020 (r365907) @@ -28,6 +28,8 @@ " \"action\": \"%s\"" \ "}\n" +int waiting(volatile int *); + int waiting(volatile int *a) { @@ -35,7 +37,7 @@ waiting(volatile int *a) } int -main(int argc, char **argv) +main(void) { volatile int a = 0; int idx; @@ -45,7 +47,8 @@ main(int argc, char **argv) continue; for (idx = 0; idx < 10; idx++) { - char *odd, *even, *json, *action; + const char *odd, *even, *action; + char *json; size *= 1.78; odd = idx % 2 == 1 ? "true" : "false"; @@ -57,7 +60,7 @@ main(int argc, char **argv) free(json); } - BUNYAN_FAKE_LOG_DEBUG("{\"finished\": true}"); + BUNYAN_FAKE_LOG_DEBUG(__DECONST(char *, "{\"finished\": true}")); return (0); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d Sat Sep 19 16:15:22 2020 (r365907) @@ -18,10 +18,10 @@ */ provider bunyan_fake { - probe log__trace(char *msg); - probe log__debug(char *msg); - probe log__info(char *msg); - probe log__warn(char *msg); - probe log__error(char *msg); - probe log__fatal(char *msg); + probe log__trace(const char *msg); + probe log__debug(const char *msg); + probe log__info(const char *msg); + probe log__warn(const char *msg); + probe log__error(const char *msg); + probe log__fatal(const char *msg); }; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,28 +24,30 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <signal.h> #include <stdlib.h> #include <unistd.h> +int go(long, long, long, long, long, long, long, long, long, long); + int -go(long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6, - long arg7, long arg8, long arg9) +go(long arg0 __unused, long arg1 __unused, long arg2 __unused, + long arg3 __unused, long arg4 __unused, long arg5 __unused, + long arg6 __unused, long arg7 __unused, long arg8 __unused, + long arg9 __unused) { return (arg1); } static void -handle(int sig) +handle(int sig __unused) { go(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); exit(0); } int -main(int argc, char **argv) +main(void) { (void) signal(SIGUSR1, handle); for (;;) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,14 +24,14 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> +extern volatile double c; + volatile double c = 1.2; int -main(int argc, char **argv) +main(int argc, char **argv __unused) { double a = 1.56; double b = (double)argc; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,10 +24,11 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> +int waiting(volatile int *); +int go(void); + int waiting(volatile int *a) { @@ -49,7 +50,7 @@ go(void) } int -main(int argc, char **argv) +main(void) { volatile int a = 0; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,14 +24,15 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/wait.h> #include <spawn.h> #include <signal.h> #include <stdio.h> +void go(void); +void intr(int); + void go(void) { @@ -43,12 +44,12 @@ go(void) } void -intr(int sig) +intr(int sig __unused) { } int -main(int argc, char **argv) +main(void) { struct sigaction sa; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <signal.h> #include <stdlib.h> #include <unistd.h> @@ -35,6 +33,11 @@ * leading underscores. */ +extern int a; + +int help(void); +int go(void); + int a = 100; int @@ -50,14 +53,14 @@ go(void) } static void -handle(int sig) +handle(int sig __unused) { go(); exit(0); } int -main(int argc, char **argv) +main(void) { (void) signal(SIGUSR1, handle); for (;;) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <signal.h> #include <stdlib.h> #include <unistd.h> @@ -35,6 +33,10 @@ * leading underscores. */ +extern int a; + +int go(void); + int a = 100; int @@ -44,14 +46,14 @@ go(void) } static void -handle(int sig) +handle(int sig __unused) { go(); exit(0); } int -main(int argc, char **argv) +main(void) { (void) signal(SIGUSR1, handle); for (;;) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,10 +24,11 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> +int waiting(volatile int *); +int go(void); + int waiting(volatile int *a) { @@ -49,7 +50,7 @@ go(void) } int -main(int argc, char **argv) +main(void) { volatile int a = 0; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <signal.h> #include <stdlib.h> #include <unistd.h> @@ -37,6 +35,8 @@ #pragma weak _go = go +int go(int); + int go(int a) { @@ -44,14 +44,14 @@ go(int a) } static void -handle(int sig) +handle(int sig __unused) { _go(1); exit(0); } int -main(int argc, char **argv) +main(void) { (void) signal(SIGUSR1, handle); for (;;) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <signal.h> #include <stdlib.h> #include <unistd.h> @@ -35,7 +33,7 @@ * leading underscores. */ -static int +static int __unused go(int a) { return (a + 1); @@ -44,14 +42,14 @@ go(int a) #pragma weak _go = go static void -handle(int sig) +handle(int sig __unused) { _go(1); exit(0); } int -main(int argc, char **argv) +main(void) { (void) signal(SIGUSR1, handle); for (;;) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c Sat Sep 19 16:15:22 2020 (r365907) @@ -26,7 +26,7 @@ #include <unistd.h> int -main(int argc, char **argv) +main(void) { for (;;) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <signal.h> #include <time.h> #include <stdlib.h> @@ -36,7 +34,7 @@ #define NANOSEC 1000000000 int -main(int argc, char **argv) +main(int argc __unused, char **argv) { struct sigevent ev; struct itimerspec ts; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,32 +24,32 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +#include <sys/cdefs.h> typedef void f(int x); static void -f_a(int i) +f_a(int i __unused) { } static void -f_b(int i) +f_b(int i __unused) { } static void -f_c(int i) +f_c(int i __unused) { } static void -f_d(int i) +f_d(int i __unused) { } static void -f_e(int i) +f_e(int i __unused) { } @@ -60,7 +60,7 @@ fN(f func, int i) } int -main() +main(void) { fN(f_a, 1); fN(f_b, 2); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,13 +24,11 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> #include <signal.h> int -main(int argc, char **argv) +main(void) { sigset_t ss; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,20 +24,18 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> #include <signal.h> #include <stdlib.h> static void -handle(int sig) +handle(int sig __unused) { exit(0); } int -main(int argc, char **argv) +main(void) { struct sigaction sa; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,20 +24,18 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> #include <signal.h> #include <stdlib.h> static void -handle(int sig) +handle(int sig __unused) { exit(0); } int -main(int argc, char **argv) +main(void) { struct sigaction sa; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/sysctl.h> @@ -33,7 +31,7 @@ #include <unistd.h> int -main(int argc, char **argv) +main(void) { int val = 1; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,12 +24,10 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> int -main(int argc, char **argv) +main(void) { for (;;) { getpid(); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,12 +24,10 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> int -main(int argc, char **argv) +main(void) { for (;;) { getpid(); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,15 +24,13 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <sys/syscall.h> #include <unistd.h> /*ARGSUSED*/ int -main(int argc, char **argv) +main(void) { for (;;) { (void) __syscall(SYS_mmap, NULL, (size_t)1, 2, 3, -1, Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,6 +24,8 @@ typedef struct season_7_lisa_the_vegetarian { int fr_salad; } season_7_lisa_the_vegetarian_t; +int sleeper(season_7_lisa_the_vegetarian_t *); + int sleeper(season_7_lisa_the_vegetarian_t *lp) { Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c Sat Sep 19 16:15:22 2020 (r365907) @@ -22,9 +22,9 @@ #include <unistd.h> typedef struct zelda_info { - char *zi_gamename; + const char *zi_gamename; int zi_ndungeons; - char *zi_villain; + const char *zi_villain; int zi_haszelda; } zelda_info_t; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c Sat Sep 19 16:15:22 2020 (r365907) @@ -27,19 +27,19 @@ typedef struct final_fantasy_info { } final_fantasy_info_t; static int -ff_getgameid(final_fantasy_info_t *f) +ff_getgameid(final_fantasy_info_t *f __unused) { return (0); } static int -ff_getpartysize(final_fantasy_info_t *f) +ff_getpartysize(final_fantasy_info_t *f __unused) { return (0); } static int -ff_getsummons(final_fantasy_info_t *f) +ff_getsummons(final_fantasy_info_t *f __unused) { return (0); } Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,12 +24,10 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/sdt.h> int -main(int argc, char **argv) +main(void) { for (;;) { DTRACE_PROBE2(test_prov, place, 10, 4); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,12 +24,10 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/sdt.h> int -main(int argc, char **argv) +main(void) { for (;;) { DTRACE_PROBE2(test_prov, place, 10, 4); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/wait.h> @@ -35,7 +33,7 @@ #include "forker.h" int -main(int argc, char **argv) +main(void) { int i; Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,12 +24,11 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <stdlib.h> #include <unistd.h> +void grow(int); void grow1(int); void @@ -53,7 +52,7 @@ grow1(int frame) } int -main(int argc, char *argv[]) +main(void) { grow(1); Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c Sat Sep 19 15:22:04 2020 (r365906) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c Sat Sep 19 16:15:22 2020 (r365907) @@ -24,12 +24,16 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> +extern volatile long long count; + volatile long long count = 0; +int baz(int); +int bar(int); +int foo(int, int); + int baz(int a) { @@ -57,5 +61,5 @@ foo(int a, int b) int main(int argc, char **argv) { - return (foo(argc, (int)argv) == 0); + return (foo(argc, (int)(uintptr_t)argv) == 0); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"