aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/cmd
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2020-09-19 16:15:22 +0000
committerMark Johnston <markj@FreeBSD.org>2020-09-19 16:15:22 +0000
commitc6989859ae9388eeb46a24fe88f9b8d07101c710 (patch)
treee7f44f7d1863a59aa66f518159cb530510c1dcea /cddl/contrib/opensolaris/cmd
parentd26ab2bec024b00bbb753248256fe68265280bfa (diff)
downloadsrc-c6989859ae9388eeb46a24fe88f9b8d07101c710.tar.gz
src-c6989859ae9388eeb46a24fe88f9b8d07101c710.zip
Address compiler warnings in C code used by the DTrace test suite.
Reported by: Jenkins MFC after: 1 week
Notes
Notes: svn path=/head/; revision=365907
Diffstat (limited to 'cddl/contrib/opensolaris/cmd')
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/arrays/tst.rax.c2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c5
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c16
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c9
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d12
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c14
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c6
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c7
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c9
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c11
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c10
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c7
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c8
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c8
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c14
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c6
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c6
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c6
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c5
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c10
33 files changed, 105 insertions, 112 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/arrays/tst.rax.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/arrays/tst.rax.c
index 87f74786a9f5..2c9edfc476e2 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/arrays/tst.rax.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/arrays/tst.rax.c
@@ -24,6 +24,8 @@
* Use is subject to license terms.
*/
+void frax(void);
+
__attribute__((optnone)) void
frax(void)
{
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c
index 9b878a21b91d..6f13f2010607 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c
@@ -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) {
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 0e6291f60912..965ad72278a1 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
@@ -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);
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 0833912ad94c..7fe7b16d1d78 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
@@ -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);
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c
index 2a54d4974be0..57211da8fdd0 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c
@@ -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);
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d
index 1a4fc87f60f4..1caad7e7d456 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d
@@ -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);
};
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c
index e26485005271..c4a5a2d20d4e 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c
@@ -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 (;;)
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c
index 450c6aae7ac2..198a5b1bf068 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.float.c
@@ -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;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c
index 8c2772396a1b..637da6996b66 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.c
@@ -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;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c
index b3959c35e8b3..7f9c40d9b795 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c
@@ -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;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c
index 12b3f724cb17..37ac07a90951 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c
@@ -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 (;;)
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c
index ea5394e120f5..9885b201254b 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c
@@ -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 (;;)
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c
index 76fa711a425a..02715690e54e 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.c
@@ -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;
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 765c285dd964..5680f2e177f6 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
@@ -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 (;;)
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 756745d99b1f..24a28420f3ef 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
@@ -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 (;;)
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c
index e72b5770b723..5e8e593825b7 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c
@@ -26,7 +26,7 @@
#include <unistd.h>
int
-main(int argc, char **argv)
+main(void)
{
for (;;)
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c
index c9cc43472cab..8a93aefb74fa 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c
@@ -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;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c
index 96d78a431cc4..16ae71acd0b8 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c
@@ -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);
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c
index 8dd7bb972ef3..11a33147b04d 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c
@@ -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;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c
index 3901d9862097..4fbc900383e7 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c
@@ -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;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c
index 3901d9862097..4fbc900383e7 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c
@@ -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;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c
index 013a9e7c7897..32668d6dd5dc 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c
@@ -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;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c
index 28ce1b87a951..dd490dacbe34 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop1.c
@@ -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();
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c
index 28ce1b87a951..dd490dacbe34 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/stop/tst.stop2.c
@@ -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();
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c
index ad483ee99629..545d4b835f37 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c
@@ -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,
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c
index a4d25f8ca872..8b1595325f6c 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c
@@ -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)
{
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c
index 595a7cb6c575..8606629fdbd5 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.c
@@ -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;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c
index 6c27593e972b..471a84cd5862 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.c
@@ -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);
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c
index 5697ef51279f..d6f2dab0e5d7 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.argmap.c
@@ -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);
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c
index 5697ef51279f..d6f2dab0e5d7 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.args.c
@@ -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);
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c
index e229c0c996a8..09c82839a7da 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c
@@ -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;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c
index edd3dd157d42..4aa7c8cc5921 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c
@@ -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);
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c
index bdeb16d9d73c..db51e2aa5b22 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ustack/tst.spin.c
@@ -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);
}