Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c (revision 366222) @@ -1,101 +1,100 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include #include #include #include #include #include static sigjmp_buf env; static void interrupt(int sig) { siglongjmp(env, sig); } 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) { (void) fprintf(stderr, "Usage: %s\n", argv[0]); return (EXIT_FAILURE); } act.sa_handler = interrupt; act.sa_flags = 0; (void) sigemptyset(&act.sa_mask); (void) sigaction(SIGUSR1, &act, NULL); closefrom(0); n = 0; /* * With all of our file descriptors closed, wait here spinning in bogus * ioctl() calls until DTrace hits us with a SIGUSR1 to start the test. */ if (sigsetjmp(env, 1) == 0) { for (;;) (void) ioctl(-1, 0, NULL); } /* * To test the fds[] array, we open /dev/null (a file with reliable * pathname and properties) using various flags and seek offsets. */ fds[n++] = open(file, O_RDONLY); fds[n++] = open(file, O_WRONLY); fds[n++] = open(file, O_RDWR); fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_NOCTTY | O_NONBLOCK | O_NDELAY | O_SYNC | O_TRUNC | 0666); fds[n++] = open(file, O_RDWR); (void) lseek(fds[n - 1], 123, SEEK_SET); /* * Once we have all the file descriptors in the state we want to test, * issue a bogus ioctl() on each fd with cmd 0 and arg NULL to whack * our DTrace script into recording the content of the fds[] array. */ for (i = 0; i < n; i++) (void) ioctl(fds[i], 0, NULL); assert(n <= sizeof (fds) / sizeof (fds[0])); exit(0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c (revision 366222) @@ -1,51 +1,49 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include typedef void f(int x); static void f1(int i) { printf("%d\n", i); } static void f2(f func, int i) { func(i); } int main() { f2(f1, 3); return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c (revision 366222) @@ -1,93 +1,93 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +#include 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); } int main() { /* * Avoid length of 1, 2, 4, or 8 bytes so DTrace will treat the data as * a byte array. */ char a[] = {(char)-7, (char)201, (char)0, (char)0, (char)28, (char)1}; char b[] = {(char)84, (char)69, (char)0, (char)0, (char)28, (char)0}; char c[] = {(char)84, (char)69, (char)0, (char)0, (char)28, (char)1}; char d[] = {(char)-7, (char)201, (char)0, (char)0, (char)29, (char)0}; char e[] = {(char)84, (char)69, (char)0, (char)0, (char)28, (char)0}; fN(f_a, a, 1); fN(f_b, b, 0); fN(f_d, d, 102); fN2(f_e, e, -2); fN(f_c, c, 0); fN(f_a, a, -1); fN(f_d, d, 101); fN(f_e, e, -2); fN(f_e, e, 2); fN2(f_e, e, 2); return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c (revision 366222) @@ -1,63 +1,66 @@ /* * This file and its contents are supplied under the terms of the * Common Development and Distribution License ("CDDL"), version 1.0. * You may only use this file in accordance with the terms of version * 1.0 of the CDDL. * * A full copy of the text of the CDDL should have accompanied this * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* * Copyright 2012 (c), Joyent, Inc. All rights reserved. */ #include #include #include #include "usdt.h" #define FMT "{" \ " \"sizes\": [ \"first\", 2, %f ]," \ " \"index\": %d," \ " \"facts\": {" \ " \"odd\": \"%s\"," \ " \"even\": \"%s\"" \ " }," \ " \"action\": \"%s\"" \ "}\n" +int waiting(volatile int *); + int waiting(volatile int *a) { return (*a); } int -main(int argc, char **argv) +main(void) { volatile int a = 0; int idx; double size = 250.5; while (waiting(&a) == 0) 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"; even = idx % 2 == 0 ? "true" : "false"; action = idx == 7 ? "ignore" : "print"; asprintf(&json, FMT, size, idx, odd, even, action); BUNYAN_FAKE_LOG_DEBUG(json); free(json); } - BUNYAN_FAKE_LOG_DEBUG("{\"finished\": true}"); + BUNYAN_FAKE_LOG_DEBUG(__DECONST(char *, "{\"finished\": true}")); return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d (revision 366222) @@ -1,27 +1,27 @@ /* * This file and its contents are supplied under the terms of the * Common Development and Distribution License ("CDDL"), version 1.0. * You may only use this file in accordance with the terms of version * 1.0 of the CDDL. * * A full copy of the text of the CDDL should have accompanied this * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* * Copyright 2012, Joyent, Inc. All rights reserved. */ /* * Sets up a fake node-bunyan-like USDT provider for use from C. */ 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); }; Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c (revision 366222) @@ -1,53 +1,55 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include +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 (;;) getpid(); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c (revision 366222) @@ -1,46 +1,46 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include +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; for (;;) { c *= a; c += b; (void) usleep(1000); } return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c (revision 366222) @@ -1,63 +1,64 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include +int waiting(volatile int *); +int go(void); + int waiting(volatile int *a) { return (*a); } int go(void) { int i, j, total = 0; for (i = 0; i < 10; i++) { for (j = 0; j < 10; j++) { total += i * j; } } return (total); } int -main(int argc, char **argv) +main(void) { volatile int a = 0; while (waiting(&a) == 0) continue; (void) fork(); (void) go(); return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c (revision 366222) @@ -1,66 +1,67 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include #include #include +void go(void); +void intr(int); + void go(void) { pid_t pid; (void) posix_spawn(&pid, "/bin/ls", NULL, NULL, NULL, NULL); (void) waitpid(pid, NULL, 0); } void -intr(int sig) +intr(int sig __unused) { } int -main(int argc, char **argv) +main(void) { struct sigaction sa; sa.sa_handler = intr; sigfillset(&sa.sa_mask); sa.sa_flags = 0; (void) sigaction(SIGUSR1, &sa, NULL); for (;;) { go(); } return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c (revision 366222) @@ -1,65 +1,68 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include /* * The canonical name should be 'go' since we prefer symbol names with fewer * leading underscores. */ +extern int a; + +int help(void); +int go(void); + int a = 100; int help(void) { return (a); } int go(void) { return (help() + 1); } 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 (;;) getpid(); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c (revision 366222) @@ -1,59 +1,61 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include /* * The canonical name should be 'go' since we prefer symbol names with fewer * leading underscores. */ +extern int a; + +int go(void); + int a = 100; int go(void) { return (a); } 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 (;;) getpid(); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c (revision 366222) @@ -1,65 +1,66 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include +int waiting(volatile int *); +int go(void); + int waiting(volatile int *a) { return (*a); } int go(void) { int i, j, total = 0; for (i = 0; i < 10; i++) { for (j = 0; j < 10; j++) { total += i * j; } } return (total); } int -main(int argc, char **argv) +main(void) { volatile int a = 0; while (waiting(&a) == 0) continue; if (vfork() == 0) { int ret = go(); (void) _exit(ret); } return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c (revision 366222) @@ -1,59 +1,59 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include /* * The canonical name should be 'go' since we prefer symbol names with fewer * leading underscores. */ #pragma weak _go = go +int go(int); + int go(int a) { return (a + 1); } 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 (;;) getpid(); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c (revision 366222) @@ -1,59 +1,57 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include /* * The canonical name should be 'go' since we prefer symbol names with fewer * leading underscores. */ -static int +static int __unused go(int a) { return (a + 1); } #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 (;;) getpid(); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c (revision 366222) @@ -1,36 +1,36 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2017 Mark Johnston */ #include int -main(int argc, char **argv) +main(void) { for (;;) sleep(1); return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c (revision 366222) @@ -1,78 +1,76 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include #include #include #include #define NANOSEC 1000000000 int -main(int argc, char **argv) +main(int argc __unused, char **argv) { struct sigevent ev; struct itimerspec ts; sigset_t set; timer_t tid; char *cmd = argv[0]; int sig; ev.sigev_notify = SIGEV_SIGNAL; ev.sigev_signo = SIGUSR1; if (timer_create(CLOCK_REALTIME, &ev, &tid) == -1) { (void) fprintf(stderr, "%s: cannot create CLOCK_HIGHRES " "timer: %s\n", cmd, strerror(errno)); exit(EXIT_FAILURE); } (void) sigemptyset(&set); (void) sigaddset(&set, SIGUSR1); (void) sigprocmask(SIG_BLOCK, &set, NULL); ts.it_value.tv_sec = 1; ts.it_value.tv_nsec = 0; ts.it_interval.tv_sec = 0; ts.it_interval.tv_nsec = NANOSEC / 2; if (timer_settime(tid, TIMER_RELTIME, &ts, NULL) == -1) { (void) fprintf(stderr, "%s: timer_settime() failed: %s\n", cmd, strerror(errno)); exit(EXIT_FAILURE); } do { (void) sigwait(&set, &sig); } while(sig != SIGUSR1); /*NOTREACHED*/ return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c (revision 366222) @@ -1,78 +1,78 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +#include 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) { } static void fN(f func, int i) { func(i); } int -main() +main(void) { fN(f_a, 1); fN(f_b, 2); fN(f_c, 3); fN(f_d, 4); fN(f_e, 5); fN(f_a, 11); fN(f_c, 13); fN(f_d, 14); fN(f_a, 101); fN(f_c, 103); fN(f_c, 1003); return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c (revision 366222) @@ -1,47 +1,45 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include int -main(int argc, char **argv) +main(void) { sigset_t ss; (void) sigemptyset(&ss); (void) sigaddset(&ss, SIGUSR1); (void) sigprocmask(SIG_BLOCK, &ss, NULL); do { (void) getpid(); (void) sigpending(&ss); } while (!sigismember(&ss, SIGUSR1)); return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c (revision 366222) @@ -1,53 +1,51 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include static void -handle(int sig) +handle(int sig __unused) { exit(0); } int -main(int argc, char **argv) +main(void) { struct sigaction sa; sa.sa_handler = handle; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; (void) sigaction(SIGUSR1, &sa, NULL); for (;;) { (void) getpid(); } } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c (revision 366222) @@ -1,53 +1,51 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include static void -handle(int sig) +handle(int sig __unused) { exit(0); } int -main(int argc, char **argv) +main(void) { struct sigaction sa; sa.sa_handler = handle; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; (void) sigaction(SIGUSR1, &sa, NULL); for (;;) { (void) getpid(); } } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c (revision 366222) @@ -1,49 +1,47 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include #include int -main(int argc, char **argv) +main(void) { int val = 1; while (1) { if (sysctlbyname("debug.dtracetest.sdttest", NULL, NULL, &val, sizeof(val))) err(1, "sysctlbyname"); sleep(1); } return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c (revision 366222) @@ -1,37 +1,35 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include int -main(int argc, char **argv) +main(void) { for (;;) { getpid(); } } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c (revision 366222) @@ -1,37 +1,35 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include int -main(int argc, char **argv) +main(void) { for (;;) { getpid(); } } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c (revision 366222) @@ -1,43 +1,41 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include /*ARGSUSED*/ int -main(int argc, char **argv) +main(void) { for (;;) { (void) __syscall(SYS_mmap, NULL, (size_t)1, 2, 3, -1, (off_t)0x12345678); } return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c (revision 366222) @@ -1,46 +1,48 @@ /* * This file and its contents are supplied under the terms of the * Common Development and Distribution License ("CDDL"), version 1.0. * You may only use this file in accordance with the terms of version * 1.0 of the CDDL. * * A full copy of the text of the CDDL should have accompanied this * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* * Copyright 2013 (c) Joyent, Inc. All rights reserved. */ /* * This test tries to make sure that we have CTF data for a type that only this * binary would reasonably have. In this case, the * season_7_lisa_the_vegetarian_t. */ #include 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) { for (;;) { sleep(lp->fr_salad); } /*NOTREACHED*/ return (0); } int main(void) { season_7_lisa_the_vegetarian_t l; l.fr_salad = 100; sleeper(&l); return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c (revision 366222) @@ -1,79 +1,79 @@ /* * This file and its contents are supplied under the terms of the * Common Development and Distribution License ("CDDL"), version 1.0. * You may only use this file in accordance with the terms of version * 1.0 of the CDDL. * * A full copy of the text of the CDDL should have accompanied this * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* * Copyright 2013 (c) Joyent, Inc. All rights reserved. */ /* * This test takes data from the current binary which is basically running in a * loop between two functions and our goal is to have two unique types that they * contain which we can print. */ #include 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; static int has_princess(zelda_info_t *z) { return (z->zi_haszelda); } static int has_dungeons(zelda_info_t *z) { return (z->zi_ndungeons != 0); } static const char * has_villain(zelda_info_t *z) { return (z->zi_villain); } int main(void) { zelda_info_t oot; zelda_info_t la; zelda_info_t lttp; oot.zi_gamename = "Ocarina of Time"; oot.zi_ndungeons = 10; oot.zi_villain = "Ganondorf"; oot.zi_haszelda = 1; la.zi_gamename = "Link's Awakening"; la.zi_ndungeons = 9; la.zi_villain = "Nightmare"; la.zi_haszelda = 0; lttp.zi_gamename = "A Link to the Past"; lttp.zi_ndungeons = 12; lttp.zi_villain = "Ganon"; lttp.zi_haszelda = 1; for (;;) { (void) has_princess(&oot); (void) has_dungeons(&la); (void) has_villain(<tp); sleep(1); } return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c (revision 366222) @@ -1,72 +1,72 @@ /* * This file and its contents are supplied under the terms of the * Common Development and Distribution License ("CDDL"), version 1.0. * You may only use this file in accordance with the terms of version * 1.0 of the CDDL. * * A full copy of the text of the CDDL should have accompanied this * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* * Copyright 2013 (c) Joyent, Inc. All rights reserved. */ /* * The point of this is to use print() on various functions to make sure that we * can print basic structures. Note that we purposefully are making sure that * there are no pointers here. */ #include typedef struct final_fantasy_info { int ff_gameid; int ff_partysize; int ff_hassummons; } 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); } int main(void) { final_fantasy_info_t ffiii, ffx, ffi; ffi.ff_gameid = 1; ffi.ff_partysize = 4; ffi.ff_hassummons = 0; ffiii.ff_gameid = 6; ffiii.ff_partysize = 4; ffiii.ff_hassummons = 1; ffx.ff_gameid = 10; ffx.ff_partysize = 3; ffx.ff_hassummons = 1; for (;;) { ff_getgameid(&ffi); ff_getpartysize(&ffx); ff_getsummons(&ffiii); sleep(1); } /*NOTREACHED*/ return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c (revision 366222) @@ -1,39 +1,37 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include int -main(int argc, char **argv) +main(void) { for (;;) { DTRACE_PROBE2(test_prov, place, 10, 4); } return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c (revision 366222) @@ -1,39 +1,37 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include int -main(int argc, char **argv) +main(void) { for (;;) { DTRACE_PROBE2(test_prov, place, 10, 4); } return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c (revision 366222) @@ -1,51 +1,49 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include #include #include "forker.h" int -main(int argc, char **argv) +main(void) { int i; for (i = 0; i < 10000; i++) { FORKER_FIRE(); if (fork() == 0) exit(0); (void) wait(NULL); } return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c (revision 366222) @@ -1,61 +1,60 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include +void grow(int); void grow1(int); void grow(int frame) { /* * Create a ridiculously large stack - enough to push us over * the default setting of 'dtrace_ustackdepth_max' (2048). */ if (frame >= 2048) for (;;) getpid(); grow1(++frame); } void grow1(int frame) { grow(++frame); } int -main(int argc, char *argv[]) +main(void) { grow(1); return (0); } Index: stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c =================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c (revision 366221) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c (revision 366222) @@ -1,61 +1,65 @@ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include +extern volatile long long count; + volatile long long count = 0; +int baz(int); +int bar(int); +int foo(int, int); + int baz(int a) { (void) getpid(); while (count != -1) { count++; a++; } return (a + 1); } int bar(int a) { return (baz(a + 1) - 1); } int foo(int a, int b) { return (bar(a) - b); } int main(int argc, char **argv) { - return (foo(argc, (int)argv) == 0); + return (foo(argc, (int)(uintptr_t)argv) == 0); } Index: stable/12 =================================================================== --- stable/12 (revision 366221) +++ stable/12 (revision 366222) Property changes on: stable/12 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r365907