From 8051afc33d92ab4a5f1565af36ec23f728942627 Mon Sep 17 00:00:00 2001 From: sebastia Date: Fri, 2 Jan 2015 22:38:46 +0000 Subject: [PATCH] Fix a few format string warnings, allow to build DEBUG kernel on sgi OK miod@ --- sys/arch/mips64/mips64/fp_emulate.c | 4 ++-- sys/arch/mips64/mips64/sendsig.c | 12 ++++++------ sys/arch/sgi/sgi/autoconf.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/arch/mips64/mips64/fp_emulate.c b/sys/arch/mips64/mips64/fp_emulate.c index 4da52d19570..ca98d219c20 100644 --- a/sys/arch/mips64/mips64/fp_emulate.c +++ b/sys/arch/mips64/mips64/fp_emulate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fp_emulate.c,v 1.9 2014/03/29 18:09:30 guenther Exp $ */ +/* $OpenBSD: fp_emulate.c,v 1.10 2015/01/02 22:38:46 sebastia Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -191,7 +191,7 @@ MipsFPTrap(struct trap_frame *tf) #ifdef DEBUG #ifdef DDB - printf("%s: unimplemented FPU completion, fsr 0x%08x\n%p: ", + printf("%s: unimplemented FPU completion, fsr 0x%08x\n0x%lx: ", p->p_comm, fsr, pc); dbmd_print_insn(insn, pc, printf); #else diff --git a/sys/arch/mips64/mips64/sendsig.c b/sys/arch/mips64/mips64/sendsig.c index 48bfcb1bd4b..118512bbcbd 100644 --- a/sys/arch/mips64/mips64/sendsig.c +++ b/sys/arch/mips64/mips64/sendsig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendsig.c,v 1.22 2014/03/26 05:23:42 guenther Exp $ */ +/* $OpenBSD: sendsig.c,v 1.23 2015/01/02 22:38:46 sebastia Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -138,7 +138,7 @@ sendsig(catcher, sig, mask, code, type, val) #ifdef DEBUG if ((sigdebug & SDB_FOLLOW) || ((sigdebug & SDB_KSTACK) && (p->p_pid == sigpid))) - printf("sendsig(%d): sig %d ssp %x usp %x scp %x\n", + printf("sendsig(%d): sig %d ssp %p usp %p scp %p\n", p->p_pid, sig, &ksc, fp, &fp->sf_sc); #endif /* @@ -229,7 +229,7 @@ sys_sigreturn(p, v, retval) scp = SCARG(uap, sigcntxp); #ifdef DEBUG if (sigdebug & SDB_FOLLOW) - printf("sigreturn: pid %d, scp %x\n", p->p_pid, scp); + printf("sigreturn: pid %d, scp %p\n", p->p_pid, scp); #endif regs = p->p_md.md_regs; /* @@ -240,10 +240,10 @@ sys_sigreturn(p, v, retval) if (error || ksc.sc_regs[ZERO] != 0xACEDBADE) { #ifdef DEBUG if (!(sigdebug & SDB_FOLLOW)) - printf("sigreturn: pid %d, scp %x\n", p->p_pid, scp); - printf(" old sp %x ra %x pc %x\n", + printf("sigreturn: pid %d, scp %p\n", p->p_pid, scp); + printf(" old sp %lx ra %lx pc %lx\n", regs->sp, regs->ra, regs->pc); - printf(" new sp %x ra %x pc %x err %d z %x\n", + printf(" new sp %lx ra %lx pc %lx err %d z %lx\n", ksc.sc_regs[SP], ksc.sc_regs[RA], ksc.sc_regs[PC], error, ksc.sc_regs[ZERO]); #endif diff --git a/sys/arch/sgi/sgi/autoconf.c b/sys/arch/sgi/sgi/autoconf.c index 70ef6d8aa00..215985a9ed8 100644 --- a/sys/arch/sgi/sgi/autoconf.c +++ b/sys/arch/sgi/sgi/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.39 2014/11/24 16:40:29 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.40 2015/01/02 22:38:46 sebastia Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. * @@ -174,10 +174,10 @@ memrange_register(uint64_t startpfn, uint64_t endpfn, uint64_t bmask) extern int console_ok; if (console_ok) - printf("%s: memory from %p to %p\n", + printf("%s: memory from 0x%lx to 0x%lx\n", __func__, ptoa(startpfn), ptoa(endpfn)); else - bios_printf("%s: memory from %p to %p\n", + bios_printf("%s: memory from 0x%lx to 0x%lx\n", __func__, ptoa(startpfn), ptoa(endpfn)); } #endif -- 2.20.1