From 84ba32e16a5822a29f3fe126266383baead78b05 Mon Sep 17 00:00:00 2001 From: miod Date: Fri, 9 May 2014 20:15:06 +0000 Subject: [PATCH] format string fixes and removal of -Wno-format for sparc kernels. --- sys/arch/sparc/conf/Makefile.sparc | 4 ++-- sys/arch/sparc/dev/dma.c | 12 ++++++------ sys/arch/sparc/sparc/autoconf.c | 8 ++++---- sys/arch/sparc/sparc/machdep.c | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/arch/sparc/conf/Makefile.sparc b/sys/arch/sparc/conf/Makefile.sparc index 96667b8237e..97ea2d4cd18 100644 --- a/sys/arch/sparc/conf/Makefile.sparc +++ b/sys/arch/sparc/conf/Makefile.sparc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sparc,v 1.79 2014/01/01 07:54:15 miod Exp $ +# $OpenBSD: Makefile.sparc,v 1.80 2014/05/09 20:15:06 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 -MD -MP CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \ - -Wno-main -Wno-uninitialized -Wno-format \ + -Wno-main -Wno-uninitialized \ -Wstack-larger-than-2047 CMACHFLAGS= -mno-fpu diff --git a/sys/arch/sparc/dev/dma.c b/sys/arch/sparc/dev/dma.c index 8d1fc60875f..e9805a250aa 100644 --- a/sys/arch/sparc/dev/dma.c +++ b/sys/arch/sparc/dev/dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma.c,v 1.28 2010/07/10 19:32:24 miod Exp $ */ +/* $OpenBSD: dma.c,v 1.29 2014/05/09 20:15:06 miod Exp $ */ /* $NetBSD: dma.c,v 1.46 1997/08/27 11:24:16 bouyer Exp $ */ /* @@ -465,7 +465,7 @@ dma_setup(sc, addr, len, datain, dmasize) sc->sc_dmaaddr = addr; sc->sc_dmalen = len; - NCR_DMA(("%s: start %d@%p,%d\n", sc->sc_dev.dv_xname, + NCR_DMA(("%s: start %zd@%p,%d\n", sc->sc_dev.dv_xname, *sc->sc_dmalen, *sc->sc_dmaaddr, datain ? 1 : 0)); /* @@ -476,7 +476,7 @@ dma_setup(sc, addr, len, datain, dmasize) *dmasize = sc->sc_dmasize = min(*dmasize, DMAMAX((size_t) *sc->sc_dmaaddr)); - NCR_DMA(("dma_setup: dmasize = %d\n", sc->sc_dmasize)); + NCR_DMA(("dma_setup: dmasize = %zd\n", sc->sc_dmasize)); /* * XXX what length? @@ -553,11 +553,11 @@ espdmaintr(sc) csr = DMACSR(sc); - NCR_DMA(("%s: intr: addr %p, csr %b\n", sc->sc_dev.dv_xname, + NCR_DMA(("%s: intr: addr %p, csr %lb\n", sc->sc_dev.dv_xname, DMADDR(sc), csr, DDMACSR_BITS)); if (csr & (D_ERR_PEND|D_SLAVE_ERR)) { - printf("%s: error: csr=%b\n", sc->sc_dev.dv_xname, + printf("%s: error: csr=%lb\n", sc->sc_dev.dv_xname, csr, DDMACSR_BITS); DMACSR(sc) &= ~D_EN_DMA; /* Stop DMA */ /* Invalidate the queue; SLAVE_ERR bit is write-to-clear */ @@ -674,7 +674,7 @@ ledmaintr(sc) if (csr & D_ERR_PEND) { DMACSR(sc) &= ~D_EN_DMA; /* Stop DMA */ DMACSR(sc) |= D_INVALIDATE; - printf("%s: error: csr=%b\n", sc->sc_dev.dv_xname, + printf("%s: error: csr=%lb\n", sc->sc_dev.dv_xname, csr, DDMACSR_BITS); DMA_RESET(sc); } diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index 35418ab2b1a..4ba613d5750 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.93 2010/11/18 21:13:19 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.94 2014/05/09 20:15:06 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */ /* @@ -179,7 +179,7 @@ bootstrap() u_long pgsiz; pgsiz = 0; - snprintf(tmpstr, sizeof tmpstr, "pagesize %x l!", + snprintf(tmpstr, sizeof tmpstr, "pagesize %lx l!", (u_long)&pgsiz); rominterpret(tmpstr); if (pgsiz == 1 << SUN4_PGSHIFT) { @@ -981,12 +981,12 @@ romprop(rp, cp, node) strcmp(getpropstring(node, "device_type"), "hierarchical") == 0) len = 0; if (len % sizeof(struct rom_reg)) { - printf("%s \"reg\" %s = %d (need multiple of %d)\n", + printf("%s \"reg\" %s = %d (need multiple of %zu)\n", cp, pl, len, sizeof(struct rom_reg)); return (0); } if (len > RA_MAXREG * sizeof(struct rom_reg)) - printf("warning: %s \"reg\" %s %d > %d, excess ignored\n", + printf("warning: %s \"reg\" %s %d > %zu, excess ignored\n", cp, pl, len, RA_MAXREG * sizeof(struct rom_reg)); rp->ra_node = node; rp->ra_name = cp; diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index 130149abda7..2eda36be3c6 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.150 2014/03/26 05:23:42 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.151 2014/05/09 20:15:06 miod Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -175,7 +175,7 @@ cpu_startup() */ printf(version); /*identifycpu();*/ - printf("real mem = %u (%uMB)\n", ptoa(physmem), + printf("real mem = %lu (%luMB)\n", ptoa(physmem), ptoa(physmem)/1024/1024); /* -- 2.20.1