From c8b758f8e73f0edaf6d85b897e86f64bbdd13a78 Mon Sep 17 00:00:00 2001 From: miod Date: Thu, 8 May 2014 21:32:45 +0000 Subject: [PATCH] Format string fixes and removal of -Wno-format for hppa kernels. --- sys/arch/hppa/conf/Makefile.hppa | 4 ++-- sys/arch/hppa/hppa/autoconf.c | 4 ++-- sys/arch/hppa/hppa/machdep.c | 6 +++--- sys/arch/hppa/hppa/mainbus.c | 4 ++-- sys/arch/hppa/hppa/trap.c | 6 +++--- sys/dev/ic/arcofi.c | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa index 82cd34630f4..594b9b3c42e 100644 --- a/sys/arch/hppa/conf/Makefile.hppa +++ b/sys/arch/hppa/conf/Makefile.hppa @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.hppa,v 1.74 2013/10/15 19:23:26 guenther Exp $ +# $OpenBSD: Makefile.hppa,v 1.75 2014/05/08 21:32:45 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= -mfast-indirect-calls -mportable-runtime -mno-space-regs diff --git a/sys/arch/hppa/hppa/autoconf.c b/sys/arch/hppa/hppa/autoconf.c index 42c8dcc771a..d0e6fdd6928 100644 --- a/sys/arch/hppa/hppa/autoconf.c +++ b/sys/arch/hppa/hppa/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.57 2013/10/04 18:34:46 kettenis Exp $ */ +/* $OpenBSD: autoconf.c,v 1.58 2014/05/08 21:32:45 miod Exp $ */ /* * Copyright (c) 1998-2003 Michael Shalayeff @@ -192,7 +192,7 @@ print_devpath(const char *label, struct pz_device *pz) for (i = 1; i < 6 && pz->pz_layers[i]; i++) printf(".%x", pz->pz_layers[i]); - printf(" class=%d flags=%b hpa=%p spa=%p io=%p\n", pz->pz_class, + printf(" class=%d flags=%b hpa=0x%x spa=0x%x io=0x%x\n", pz->pz_class, pz->pz_flags, PZF_BITS, pz->pz_hpa, pz->pz_spa, pz->pz_iodc_io); } diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index 80f521eac4c..b4049af0e78 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.219 2014/04/08 09:34:23 mpi Exp $ */ +/* $OpenBSD: machdep.c,v 1.220 2014/05/08 21:32:45 miod Exp $ */ /* * Copyright (c) 1999-2003 Michael Shalayeff @@ -624,9 +624,9 @@ cpu_startup(void) printf(version); printf("%s\n", cpu_model); - printf("real mem = %u (%uMB)\n", ptoa(physmem), + printf("real mem = %lu (%luMB)\n", ptoa(physmem), ptoa(physmem) / 1024 / 1024); - printf("rsvd mem = %u (%uKB)\n", ptoa(resvmem), ptoa(resvmem) / 1024); + printf("rsvd mem = %lu (%luKB)\n", ptoa(resvmem), ptoa(resvmem) / 1024); /* * Allocate a submap for exec arguments. This map effectively diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c index 17d2c114a11..1b56adf65c1 100644 --- a/sys/arch/hppa/hppa/mainbus.c +++ b/sys/arch/hppa/hppa/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.83 2014/04/08 09:34:23 mpi Exp $ */ +/* $OpenBSD: mainbus.c,v 1.84 2014/05/08 21:32:45 miod Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -1141,7 +1141,7 @@ mbattach(parent, self, aux) if (pdc_call((iodcio_t)pdc, 0, PDC_HPA, PDC_HPA_DFLT, &pdc_hpa) < 0) panic("mbattach: PDC_HPA failed"); - printf(" [flex %lx]\n", pdc_hpa.hpa & HPPA_FLEX_MASK); + printf(" [flex %x]\n", pdc_hpa.hpa & HPPA_FLEX_MASK); /* map all the way till the end of the memory */ if (bus_space_map(&hppa_bustag, pdc_hpa.hpa, diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c index 4ff9408e63e..1b5e34c678a 100644 --- a/sys/arch/hppa/hppa/trap.c +++ b/sys/arch/hppa/hppa/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.130 2014/04/18 11:51:16 guenther Exp $ */ +/* $OpenBSD: trap.c,v 1.131 2014/05/08 21:32:45 miod Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -465,7 +465,7 @@ trap(int type, struct trapframe *frame) trapsignal(p, SIGILL, type & ~T_USER, ILL_ILLTRP, sv); KERNEL_UNLOCK(); } else - panic("trap: %s @ 0x%x:0x%x for 0x%x:0x%x irr 0x%08x", + panic("trap: %s @ 0x%lx:0x%lx for 0x%x:0x%lx irr 0x%08x", tts, frame->tf_iisq_head, frame->tf_iioq_head, space, va, opcode); break; @@ -914,7 +914,7 @@ syscall(struct trapframe *frame) #ifdef DIAGNOSTIC if (curcpu()->ci_cpl != oldcpl) { printf("WARNING: SPL (0x%x) NOT LOWERED ON " - "syscall(0x%x, 0x%x, 0x%x, 0x%x...) EXIT, PID %d\n", + "syscall(0x%x, 0x%lx, 0x%lx, 0x%lx...) EXIT, PID %d\n", curcpu()->ci_cpl, code, args[0], args[1], args[2], p->p_pid); curcpu()->ci_cpl = oldcpl; diff --git a/sys/dev/ic/arcofi.c b/sys/dev/ic/arcofi.c index a89825aeb2a..c52ce82b466 100644 --- a/sys/dev/ic/arcofi.c +++ b/sys/dev/ic/arcofi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arcofi.c,v 1.6 2013/05/15 08:29:24 ratchov Exp $ */ +/* $OpenBSD: arcofi.c,v 1.7 2014/05/08 21:32:45 miod Exp $ */ /* * Copyright (c) 2011 Miodrag Vallat. @@ -1294,5 +1294,5 @@ arcofi_attach(struct arcofi_softc *sc, const char *version) error: arcofi_write(sc, ARCOFI_ID, 0); - printf("%s: %02x command failed, error %d\n", __func__, cmd, rc); + printf("%s: command failed, error %d\n", __func__, rc); } -- 2.20.1