aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/mk/bsd.kern.mk6
-rw-r--r--sys/compat/svr4/imgact_svr4.c12
-rw-r--r--sys/compat/svr4/svr4_fcntl.c2
-rw-r--r--sys/compat/svr4/svr4_ioctl.c6
-rw-r--r--sys/compat/svr4/svr4_misc.c2
-rw-r--r--sys/compat/svr4/svr4_signal.c2
-rw-r--r--sys/compat/svr4/svr4_stream.c6
-rw-r--r--sys/compat/svr4/svr4_termios.c2
-rw-r--r--sys/conf/kern.mk6
9 files changed, 19 insertions, 25 deletions
diff --git a/share/mk/bsd.kern.mk b/share/mk/bsd.kern.mk
index d81fd7ce6995..ba78e3b34249 100644
--- a/share/mk/bsd.kern.mk
+++ b/share/mk/bsd.kern.mk
@@ -3,12 +3,8 @@
#
# Warning flags for compiling the kernel and components of the kernel.
#
-# Note that the newly added -Wcast-qual is responsible for generating
-# most of the remaining warnings. Warnings introduced with -Wall will
-# also pop up, but are easier to fix.
-#
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
- -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
+ -Wmissing-prototypes -Wpointer-arith -Winline \
-fformat-extensions -ansi
#
# The following flags are next up for working on:
diff --git a/sys/compat/svr4/imgact_svr4.c b/sys/compat/svr4/imgact_svr4.c
index 75c3c57da2d2..6692c98f9cdb 100644
--- a/sys/compat/svr4/imgact_svr4.c
+++ b/sys/compat/svr4/imgact_svr4.c
@@ -88,7 +88,7 @@ exec_svr4_imgact(imgp)
}
bss_size = round_page(a_out->a_bss);
#ifdef DEBUG
- printf("imgact: text: %08x, data: %08x, bss: %08x\n", a_out->a_text, a_out->a_data, bss_size);
+ printf("imgact: text: %08lx, data: %08lx, bss: %08lx\n", a_out->a_text, a_out->a_data, bss_size);
#endif
/*
@@ -129,7 +129,7 @@ exec_svr4_imgact(imgp)
*/
if (file_offset & PAGE_MASK) {
#ifdef DEBUG
- printf("imgact: Non page aligned binary %d\n", file_offset);
+ printf("imgact: Non page aligned binary %lu\n", file_offset);
#endif
/*
* Map text+data+bss read/write/execute
@@ -170,7 +170,7 @@ exec_svr4_imgact(imgp)
}
else {
#ifdef DEBUG
- printf("imgact: Page aligned binary %d\n", file_offset);
+ printf("imgact: Page aligned binary %lu\n", file_offset);
#endif
/*
* Map text+data read/execute
@@ -186,7 +186,8 @@ exec_svr4_imgact(imgp)
return (error);
#ifdef DEBUG
- printf("imgact: startaddr=%08x, length=%08x\n", vmaddr, a_out->a_text + a_out->a_data);
+ printf("imgact: startaddr=%08lx, length=%08lx\n", (u_long)vmaddr,
+ a_out->a_text + a_out->a_data);
#endif
/*
* allow read/write of data
@@ -209,7 +210,8 @@ exec_svr4_imgact(imgp)
if (error)
return (error);
#ifdef DEBUG
- printf("imgact: bssaddr=%08x, length=%08x\n", vmaddr, bss_size);
+ printf("imgact: bssaddr=%08lx, length=%08lx\n",
+ (u_long)vmaddr, bss_size);
#endif
}
diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c
index 4fe760fb0464..afa62b7de668 100644
--- a/sys/compat/svr4/svr4_fcntl.c
+++ b/sys/compat/svr4/svr4_fcntl.c
@@ -588,7 +588,7 @@ svr4_sys_fcntl(p, uap)
long cmd;
int flags;
- DPRINTF(("Setting flags 0x%x\n", SCARG(uap, arg)));
+ DPRINTF(("Setting flags %p\n", SCARG(uap, arg)));
cmd = SCARG(&fa, cmd); /* save it for a while */
SCARG(&fa, cmd) = F_GETFL;
diff --git a/sys/compat/svr4/svr4_ioctl.c b/sys/compat/svr4/svr4_ioctl.c
index 55465d12d361..d93e2b85c29b 100644
--- a/sys/compat/svr4/svr4_ioctl.c
+++ b/sys/compat/svr4/svr4_ioctl.c
@@ -96,7 +96,7 @@ svr4_sys_ioctl(p, uap)
svr4_decode_cmd(SCARG(uap, com), dir, &c, &num, &argsiz);
- DPRINTF(("svr4_ioctl[%x](%d, _IO%s(%c, %d, %d), %p);\n", SCARG(uap, com), SCARG(uap, fd),
+ DPRINTF(("svr4_ioctl[%lx](%d, _IO%s(%c, %d, %d), %p);\n", SCARG(uap, com), SCARG(uap, fd),
dir, c, num, argsiz, SCARG(uap, data)));
#endif
retval = p->p_retval;
@@ -112,7 +112,7 @@ svr4_sys_ioctl(p, uap)
#if defined(DEBUG_SVR4)
if (fp->f_type == DTYPE_SOCKET) {
- struct socket *so = fp->f_data;
+ struct socket *so = (struct socket *)fp->f_data;
DPRINTF(("<<< IN: so_state = 0x%x\n", so->so_state));
}
#endif
@@ -153,7 +153,7 @@ svr4_sys_ioctl(p, uap)
}
#if defined(DEBUG_SVR4)
if (fp->f_type == DTYPE_SOCKET) {
- struct socket *so = fp->f_data;
+ struct socket *so = (struct socket *)fp->f_data;
DPRINTF((">>> OUT: so_state = 0x%x\n", so->so_state));
}
#endif
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index a92e8a4a02fb..6865880b3ae0 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -921,7 +921,7 @@ svr4_sys_ulimit(p, uap)
return error;
SCARG(&srl, which) = RLIMIT_FSIZE;
- SCARG(&srl, rlp) = (struct orlimit *)url;
+ SCARG(&srl, rlp) = url;
error = setrlimit(p, &srl);
if (error)
diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c
index 8a855bfd1252..0273a7a72afc 100644
--- a/sys/compat/svr4/svr4_signal.c
+++ b/sys/compat/svr4/svr4_signal.c
@@ -299,7 +299,7 @@ svr4_sys_sigaction(p, uap)
for (i = 0; i < 4; i++)
DPRINTF(("\tssa_mask[%d] = %lx\n", i,
nisa->ssa_mask.bits[i]));
- DPRINTF(("\tssa_handler = %lx\n", nisa->ssa_handler));
+ DPRINTF(("\tssa_handler = %p\n", nisa->ssa_handler));
}
#endif
diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c
index ed7c8fa90520..45a2a5e24748 100644
--- a/sys/compat/svr4/svr4_stream.c
+++ b/sys/compat/svr4/svr4_stream.c
@@ -1549,9 +1549,9 @@ svr4_stream_ioctl(fp, p, retval, fd, cmd, dat)
return i_nread(fp, p, retval, fd, cmd, dat);
case SVR4_I_PUSH:
- DPRINTF(("I_PUSH %x\n", dat));
+ DPRINTF(("I_PUSH %p\n", dat));
#if defined(DEBUG_SVR4)
- show_strbuf(dat);
+ show_strbuf((struct svr4_strbuf *)dat);
#endif
return 0;
@@ -2270,7 +2270,7 @@ svr4_sys_sendto(p, uap)
SCARG(&sa, buf) = SCARG(uap, buf);
SCARG(&sa, len) = SCARG(uap, len);
SCARG(&sa, flags) = SCARG(uap, flags);
- SCARG(&sa, to) = SCARG(uap, to);
+ SCARG(&sa, to) = (caddr_t)SCARG(uap, to);
SCARG(&sa, tolen) = SCARG(uap, tolen);
DPRINTF(("calling sendto()\n"));
diff --git a/sys/compat/svr4/svr4_termios.c b/sys/compat/svr4/svr4_termios.c
index bd3ac782a6d2..d50f97f80173 100644
--- a/sys/compat/svr4/svr4_termios.c
+++ b/sys/compat/svr4/svr4_termios.c
@@ -493,7 +493,7 @@ svr4_term_ioctl(fp, p, retval, fd, cmd, data)
*retval = 0;
- DPRINTF(("TERM ioctl %x\n", cmd));
+ DPRINTF(("TERM ioctl %lx\n", cmd));
switch (cmd) {
case SVR4_TCGETA:
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index d81fd7ce6995..ba78e3b34249 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -3,12 +3,8 @@
#
# Warning flags for compiling the kernel and components of the kernel.
#
-# Note that the newly added -Wcast-qual is responsible for generating
-# most of the remaining warnings. Warnings introduced with -Wall will
-# also pop up, but are easier to fix.
-#
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
- -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
+ -Wmissing-prototypes -Wpointer-arith -Winline \
-fformat-extensions -ansi
#
# The following flags are next up for working on: