Cast an int to (intptr_t) before casting it to (void *).

Don't cast a pointer to a long just to print it.
This commit is contained in:
Bruce Evans 1998-08-16 01:04:48 +00:00
parent 5e95012499
commit 9d97be3511
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38353
2 changed files with 8 additions and 8 deletions

View File

@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE. * 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 #ifndef lint
@ -465,7 +465,7 @@ si_eisa_attach(ed)
* to be lazy and hand it the unit number. * to be lazy and hand it the unit number.
*/ */
if (eisa_reg_intr(ed, irq, (void (*)(void *)) si_intr, 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", printf("si%d: failed to register interrupt %d\n",
ed->unit, irq); ed->unit, irq);
return -1; return -1;
@ -517,8 +517,8 @@ siprobe(id)
*/ */
if ((caddr_t)paddr < (caddr_t)IOM_BEGIN || if ((caddr_t)paddr < (caddr_t)IOM_BEGIN ||
(caddr_t)paddr >= (caddr_t)IOM_END) { (caddr_t)paddr >= (caddr_t)IOM_END) {
printf("si%d: iomem (%lx) out of range\n", printf("si%d: iomem (%p) out of range\n",
id->id_unit, (long)paddr); id->id_unit, (void *)paddr);
return(0); return(0);
} }

View File

@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE. * 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 #ifndef lint
@ -465,7 +465,7 @@ si_eisa_attach(ed)
* to be lazy and hand it the unit number. * to be lazy and hand it the unit number.
*/ */
if (eisa_reg_intr(ed, irq, (void (*)(void *)) si_intr, 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", printf("si%d: failed to register interrupt %d\n",
ed->unit, irq); ed->unit, irq);
return -1; return -1;
@ -517,8 +517,8 @@ siprobe(id)
*/ */
if ((caddr_t)paddr < (caddr_t)IOM_BEGIN || if ((caddr_t)paddr < (caddr_t)IOM_BEGIN ||
(caddr_t)paddr >= (caddr_t)IOM_END) { (caddr_t)paddr >= (caddr_t)IOM_END) {
printf("si%d: iomem (%lx) out of range\n", printf("si%d: iomem (%p) out of range\n",
id->id_unit, (long)paddr); id->id_unit, (void *)paddr);
return(0); return(0);
} }