summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-05-09 18:16:16 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-05-09 18:16:16 +0000
commit7699954e2c9dcc5827f97d694bbfb89b924fc102 (patch)
tree09846fb4a5e504a46101b7cc571ef314bb649d7d
parentc2a86cd44cccc796fc49d72dd87c93ed3207a1fc (diff)
Format string fixes and removal of -Wno-format for *ppc kernels.
-rw-r--r--sys/arch/macppc/conf/Makefile.macppc4
-rw-r--r--sys/arch/macppc/macppc/clock.c4
-rw-r--r--sys/arch/macppc/macppc/machdep.c6
-rw-r--r--sys/arch/powerpc/powerpc/fpu.c6
-rw-r--r--sys/arch/powerpc/powerpc/pmap.c4
-rw-r--r--sys/arch/powerpc/powerpc/trap.c8
-rw-r--r--sys/arch/socppc/conf/Makefile.socppc4
-rw-r--r--sys/arch/socppc/dev/obio.c4
-rw-r--r--sys/arch/socppc/socppc/machdep.c8
-rw-r--r--sys/dev/usb/utpms.c4
10 files changed, 26 insertions, 26 deletions
diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc
index c94643d7ce8..ff8cce055ef 100644
--- a/sys/arch/macppc/conf/Makefile.macppc
+++ b/sys/arch/macppc/conf/Makefile.macppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.macppc,v 1.67 2013/10/15 19:23:28 guenther Exp $
+# $OpenBSD: Makefile.macppc,v 1.68 2014/05/09 18:16:15 miod Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -24,7 +24,7 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I$S -I. -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-main -Wno-uninitialized -Wno-format \
+ -Wno-main -Wno-uninitialized \
-Wstack-larger-than-2047
CMACHFLAGS= -msoft-float -Wa,-many
diff --git a/sys/arch/macppc/macppc/clock.c b/sys/arch/macppc/macppc/clock.c
index bec1d950a16..893548c1f05 100644
--- a/sys/arch/macppc/macppc/clock.c
+++ b/sys/arch/macppc/macppc/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.36 2014/04/01 20:27:14 mpi Exp $ */
+/* $OpenBSD: clock.c,v 1.37 2014/05/09 18:16:15 miod Exp $ */
/* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */
/*
@@ -133,7 +133,7 @@ inittodr(time_t base)
if (deltat < 0)
deltat = -deltat;
if (!(waszero || deltat < 2 * SECDAY)) {
- printf("WARNING: clock %s %d days",
+ printf("WARNING: clock %s %ld days",
tv.tv_sec < base ? "lost" : "gained", deltat / SECDAY);
bad = "";
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 85f3aeaae3e..85bf429549d 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.149 2014/04/01 20:27:14 mpi Exp $ */
+/* $OpenBSD: machdep.c,v 1.150 2014/05/09 18:16:15 miod Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -986,7 +986,7 @@ bus_space_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size,
if (extent_free(devio_ex, bpa, size, EX_NOWAIT |
(ppc_malloc_ok ? EX_MALLOCOK : 0)))
{
- printf("bus_space_map: pa 0x%lx, size 0x%x\n",
+ printf("bus_space_map: pa 0x%lx, size 0x%lx\n",
bpa, size);
printf("bus_space_map: can't free region\n");
}
@@ -1018,7 +1018,7 @@ bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size)
if (extent_free(devio_ex, bpa | (bsh & PAGE_MASK), size, EX_NOWAIT |
(ppc_malloc_ok ? EX_MALLOCOK : 0)))
{
- printf("bus_space_map: pa 0x%lx, size 0x%x\n",
+ printf("bus_space_map: pa 0x%lx, size 0x%lx\n",
bpa, size);
printf("bus_space_map: can't free region\n");
}
diff --git a/sys/arch/powerpc/powerpc/fpu.c b/sys/arch/powerpc/powerpc/fpu.c
index de60bf28b7c..fc90fc8f12a 100644
--- a/sys/arch/powerpc/powerpc/fpu.c
+++ b/sys/arch/powerpc/powerpc/fpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu.c,v 1.12 2009/12/10 16:46:09 deraadt Exp $ */
+/* $OpenBSD: fpu.c,v 1.13 2014/05/09 18:16:15 miod Exp $ */
/* $NetBSD: fpu.c,v 1.1 1996/09/30 16:34:44 ws Exp $ */
/*
@@ -52,8 +52,8 @@ enable_fpu(struct proc *p)
}
if (pcb->pcb_fpcpu != NULL || ci->ci_fpuproc != NULL) {
- printf("attempting to restore fpu state when in use pcb %x"
- " fpproc %x\n", pcb->pcb_fpcpu, ci->ci_fpuproc);
+ printf("attempting to restore fpu state when in use pcb %p"
+ " fpproc %p\n", pcb->pcb_fpcpu, ci->ci_fpuproc);
}
msr = ppc_mfmsr();
ppc_mtmsr((msr & ~PSL_EE) | PSL_FP);
diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c
index a27258e4bc1..befd1a4fcba 100644
--- a/sys/arch/powerpc/powerpc/pmap.c
+++ b/sys/arch/powerpc/powerpc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.128 2014/04/26 14:19:04 mpi Exp $ */
+/* $OpenBSD: pmap.c,v 1.129 2014/05/09 18:16:15 miod Exp $ */
/*
* Copyright (c) 2001, 2002, 2007 Dale Rahn.
@@ -1551,7 +1551,7 @@ pmap_steal_avail(size_t size, int align)
}
}
}
- panic ("unable to allocate region with size %x align %x",
+ panic ("unable to allocate region with size %zx align %x",
size, align);
}
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c
index bca3dab1277..8725a286db1 100644
--- a/sys/arch/powerpc/powerpc/trap.c
+++ b/sys/arch/powerpc/powerpc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.96 2014/04/18 11:51:17 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.97 2014/05/09 18:16:15 miod Exp $ */
/* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */
/*
@@ -184,8 +184,8 @@ enable_vec(struct proc *p)
pcb->pcb_vr = pool_get(&ppc_vecpl, PR_WAITOK | PR_ZERO);
if (curcpu()->ci_vecproc != NULL || pcb->pcb_veccpu != NULL)
- printf("attempting to restore vector in use vecproc %x"
- " veccpu %x\n", curcpu()->ci_vecproc, pcb->pcb_veccpu);
+ printf("attempting to restore vector in use vecproc %p"
+ " veccpu %p\n", curcpu()->ci_vecproc, pcb->pcb_veccpu);
/* first we enable vector so that we dont throw an exception
* in kernel mode
@@ -523,7 +523,7 @@ mpc_print_pci_stat();
name = "0";
offset = frame->srr0;
}
- panic ("trap type %x at %x (%s+0x%lx) lr %x",
+ panic ("trap type %x at %x (%s+0x%lx) lr %lx",
type, frame->srr0, name, offset, frame->lr);
diff --git a/sys/arch/socppc/conf/Makefile.socppc b/sys/arch/socppc/conf/Makefile.socppc
index c8ab05671f2..11ec405c561 100644
--- a/sys/arch/socppc/conf/Makefile.socppc
+++ b/sys/arch/socppc/conf/Makefile.socppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.socppc,v 1.38 2013/10/15 19:23:30 guenther Exp $
+# $OpenBSD: Makefile.socppc,v 1.39 2014/05/09 18:16:15 miod Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -24,7 +24,7 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I$S -I. -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-main -Wno-uninitialized -Wno-format \
+ -Wno-main -Wno-uninitialized \
-Wstack-larger-than-2047
CMACHFLAGS= -msoft-float -Wa,-many
diff --git a/sys/arch/socppc/dev/obio.c b/sys/arch/socppc/dev/obio.c
index 7aa64c24b7c..77b517208d0 100644
--- a/sys/arch/socppc/dev/obio.c
+++ b/sys/arch/socppc/dev/obio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: obio.c,v 1.5 2009/09/06 20:09:34 kettenis Exp $ */
+/* $OpenBSD: obio.c,v 1.6 2014/05/09 18:16:15 miod Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -93,7 +93,7 @@ obio_print(void *aux, const char *name)
if (name)
printf("\"%s\" at %s", oa->oa_name, name);
if (oa->oa_offset)
- printf(" offset 0x%05x", oa->oa_offset);
+ printf(" offset 0x%05lx", oa->oa_offset);
if (oa->oa_ivec != -1)
printf(" ivec %d", oa->oa_ivec);
diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c
index 87f0deda4fc..a1e013162d7 100644
--- a/sys/arch/socppc/socppc/machdep.c
+++ b/sys/arch/socppc/socppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.45 2014/04/01 20:42:39 mpi Exp $ */
+/* $OpenBSD: machdep.c,v 1.46 2014/05/09 18:16:15 miod Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -489,7 +489,7 @@ bus_space_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size,
if (extent_free(devio_ex, bpa, size, EX_NOWAIT |
(ppc_malloc_ok ? EX_MALLOCOK : 0)))
{
- printf("bus_space_map: pa 0x%lx, size 0x%x\n",
+ printf("bus_space_map: pa 0x%lx, size 0x%lx\n",
bpa, size);
printf("bus_space_map: can't free region\n");
}
@@ -523,7 +523,7 @@ bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size)
if (extent_free(devio_ex, bpa | (bsh & PAGE_MASK), size, EX_NOWAIT |
(ppc_malloc_ok ? EX_MALLOCOK : 0)))
{
- printf("bus_space_map: pa 0x%lx, size 0x%x\n",
+ printf("bus_space_map: pa 0x%lx, size 0x%lx\n",
bpa, size);
printf("bus_space_map: can't free region\n");
}
@@ -792,7 +792,7 @@ cpu_startup()
printf("%s", version);
- printf("real mem = %u (%uMB)\n", ptoa(physmem),
+ printf("real mem = %lu (%luMB)\n", ptoa(physmem),
ptoa(physmem)/1024/1024);
/*
diff --git a/sys/dev/usb/utpms.c b/sys/dev/usb/utpms.c
index 09b34b91b59..f08597fa21f 100644
--- a/sys/dev/usb/utpms.c
+++ b/sys/dev/usb/utpms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utpms.c,v 1.3 2013/11/15 08:17:44 pirofti Exp $ */
+/* $OpenBSD: utpms.c,v 1.4 2014/05/09 18:16:15 miod Exp $ */
/*
* Copyright (c) 2005, Johan Wallén
@@ -334,7 +334,7 @@ utpms_attach(struct device *parent, struct device *self, void *aux)
}
if (sc->sc_x_sensors <= 0 || sc->sc_x_sensors > UTPMS_X_SENSORS ||
sc->sc_y_sensors <= 0 || sc->sc_y_sensors > UTPMS_Y_SENSORS) {
- printf(": unexpected sensors configuration (d:d)\n",
+ printf(": unexpected sensors configuration (%d:%d)\n",
sc->sc_x_sensors, sc->sc_y_sensors);
return;
}