From 9d97be35113fa6aa1f070bb8fca7f5a78aeb46b2 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 16 Aug 1998 01:04:48 +0000 Subject: [PATCH] Cast an int to (intptr_t) before casting it to (void *). Don't cast a pointer to a long just to print it. --- sys/dev/si/si.c | 8 ++++---- sys/i386/isa/si.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 81430ffe0dd7..4b37f61e3a98 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -30,7 +30,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHORS BE LIABLE. * - * $Id: si.c,v 1.73 1998/06/13 19:36:22 steve Exp $ + * $Id: si.c,v 1.74 1998/08/16 00:57:07 bde Exp $ */ #ifndef lint @@ -465,7 +465,7 @@ si_eisa_attach(ed) * to be lazy and hand it the unit number. */ if (eisa_reg_intr(ed, irq, (void (*)(void *)) si_intr, - (void *)(ed->unit), &tty_imask, 1)) { + (void *)(intptr_t)(ed->unit), &tty_imask, 1)) { printf("si%d: failed to register interrupt %d\n", ed->unit, irq); return -1; @@ -517,8 +517,8 @@ siprobe(id) */ if ((caddr_t)paddr < (caddr_t)IOM_BEGIN || (caddr_t)paddr >= (caddr_t)IOM_END) { - printf("si%d: iomem (%lx) out of range\n", - id->id_unit, (long)paddr); + printf("si%d: iomem (%p) out of range\n", + id->id_unit, (void *)paddr); return(0); } diff --git a/sys/i386/isa/si.c b/sys/i386/isa/si.c index 81430ffe0dd7..4b37f61e3a98 100644 --- a/sys/i386/isa/si.c +++ b/sys/i386/isa/si.c @@ -30,7 +30,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHORS BE LIABLE. * - * $Id: si.c,v 1.73 1998/06/13 19:36:22 steve Exp $ + * $Id: si.c,v 1.74 1998/08/16 00:57:07 bde Exp $ */ #ifndef lint @@ -465,7 +465,7 @@ si_eisa_attach(ed) * to be lazy and hand it the unit number. */ if (eisa_reg_intr(ed, irq, (void (*)(void *)) si_intr, - (void *)(ed->unit), &tty_imask, 1)) { + (void *)(intptr_t)(ed->unit), &tty_imask, 1)) { printf("si%d: failed to register interrupt %d\n", ed->unit, irq); return -1; @@ -517,8 +517,8 @@ siprobe(id) */ if ((caddr_t)paddr < (caddr_t)IOM_BEGIN || (caddr_t)paddr >= (caddr_t)IOM_END) { - printf("si%d: iomem (%lx) out of range\n", - id->id_unit, (long)paddr); + printf("si%d: iomem (%p) out of range\n", + id->id_unit, (void *)paddr); return(0); }