Module Name:    src
Committed By:   jakllsch
Date:           Sun Aug  7 19:46:22 UTC 2011

Modified Files:
        src/sys/dev/isa: dpt_isa.c

Log Message:
Appease _LP64 build with GCC 4.5.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/isa/dpt_isa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/isa/dpt_isa.c
diff -u src/sys/dev/isa/dpt_isa.c:1.20 src/sys/dev/isa/dpt_isa.c:1.21
--- src/sys/dev/isa/dpt_isa.c:1.20	Tue May 12 09:10:15 2009
+++ src/sys/dev/isa/dpt_isa.c	Sun Aug  7 19:46:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dpt_isa.c,v 1.20 2009/05/12 09:10:15 cegger Exp $	*/
+/*	$NetBSD: dpt_isa.c,v 1.21 2011/08/07 19:46:22 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Andrew Doran <a...@netbsd.org>
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dpt_isa.c,v 1.20 2009/05/12 09:10:15 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dpt_isa.c,v 1.21 2011/08/07 19:46:22 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -171,7 +171,7 @@
 	 */
 	bus_space_write_1(iot, ioh, HA_COMMAND, CP_PIO_GETCFG);
 	memset(&ec, 0, sizeof(ec));
-	i = ((int)&((struct eata_cfg *)0)->ec_cfglen +
+	i = ((uintptr_t)&((struct eata_cfg *)0)->ec_cfglen +
 	    sizeof(ec.ec_cfglen)) >> 1;
 	p = (u_int16_t *)&ec;
 
@@ -183,13 +183,13 @@
 		*p++ = bus_space_read_stream_2(iot, ioh, HA_DATA);
 
 	if ((i = ec.ec_cfglen) > (sizeof(struct eata_cfg)
-	    - (int)(&(((struct eata_cfg *)0L)->ec_cfglen))
+	    - (uintptr_t)(&(((struct eata_cfg *)0L)->ec_cfglen))
 	    - sizeof(ec.ec_cfglen)))
 		i = sizeof(struct eata_cfg)
-		  - (int)(&(((struct eata_cfg *)0L)->ec_cfglen))
+		  - (uintptr_t)(&(((struct eata_cfg *)0L)->ec_cfglen))
 		  - sizeof(ec.ec_cfglen);
 
-	j = i + (int)(&(((struct eata_cfg *)0L)->ec_cfglen)) +
+	j = i + (uintptr_t)(&(((struct eata_cfg *)0L)->ec_cfglen)) +
 	    sizeof(ec.ec_cfglen);
 	i >>= 1;
 

Reply via email to