6309366 gcc and cmd/cvcd don't get along
authormathue
Mon, 31 Oct 2005 16:23:43 -0800
changeset 796 e9b20e3531f8
parent 795 422765778db0
child 797 af56ba8b7e41
6309366 gcc and cmd/cvcd don't get along 6272090 gcc and cmd/pcmciad don't get along 6273814 gcc and cmd/rmformat don't get along 6273880 gcc and cmd/smserverd don't get along 6309225 gcc and efcode don't get along 6309403 gcc and se don't get along 6310538 gcc and stp4020 don't get along 6309970 gcc and fas don't get along 6310423 gcc and zs don't get along 6309951 gcc and ebus don't get along 6310427 gcc and su driver don't get along 6310552 gcc and starfire don't get along 6308013 gcc and cmd/picl don't get along 6310441 gcc and rmclomv don't get along 6309943 gcc and sun ata don't get along 6309421 gcc and excalibur/io don't get along
usr/src/cmd/cvcd/sparc/sun4u/starcat/cvcd.c
usr/src/cmd/cvcd/sparc/sun4u/starfire/cvcd.c
usr/src/cmd/pcmciad/pcmciad.c
usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.c
usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c
usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvd.c
usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects.h
usr/src/cmd/rmformat/rmf_main.c
usr/src/cmd/smserverd/smediad.c
usr/src/lib/efcode/engine/debug.c
usr/src/lib/efcode/engine/env.c
usr/src/lib/efcode/engine/mcookie.c
usr/src/uts/common/pcmcia/nexus/pcmcia.c
usr/src/uts/sun/io/scsi/adapters/fas.c
usr/src/uts/sun/io/stp4020.c
usr/src/uts/sun/io/zs_async.c
usr/src/uts/sun/io/zs_hdlc.c
usr/src/uts/sun/sys/dada/impl/udcd.h
usr/src/uts/sun4/io/ebus.c
usr/src/uts/sun4/io/su_driver.c
usr/src/uts/sun4u/excalibur/io/xcalppm.c
usr/src/uts/sun4u/excalibur/io/xcalwd.c
usr/src/uts/sun4u/starfire/os/starfire.c
--- a/usr/src/cmd/cvcd/sparc/sun4u/starcat/cvcd.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/cmd/cvcd/sparc/sun4u/starcat/cvcd.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -90,6 +90,7 @@
 static char		progname[MAXPATHLEN];
 static int		debug = 0;
 
+int
 main(int argc, char **argv)
 {
 	int			err;
--- a/usr/src/cmd/cvcd/sparc/sun4u/starfire/cvcd.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/cmd/cvcd/sparc/sun4u/starfire/cvcd.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -113,6 +113,7 @@
 static int		peercheck = 1;
 static char		nic_name[32];
 
+int
 main(int argc, char **argv)
 {
 	int			opt;
--- a/usr/src/cmd/pcmciad/pcmciad.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/cmd/pcmciad/pcmciad.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 1998-2003 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -252,7 +252,7 @@
 static void task_create(int);
 static void task_init(int);
 
-void
+int
 main(int argc, char *argv[])
 {
 	sigset_t	sigs;
@@ -338,7 +338,7 @@
 		perror("thr_sigsetmask");
 #endif
 	(void) sigpause(1);
-	exit(0x22);
+	return (0x22);
 }
 
 /*
--- a/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -1033,7 +1033,7 @@
 	picl_nodehdl_t	ledh;
 	picl_nodehdl_t	proph;
 
-	if ((led_state->state == LOM_LED_STATE_NOT_PRESENT) ||
+	if (((unsigned char)led_state->state == LOM_LED_STATE_NOT_PRESENT) ||
 	    (led_state->label[0] == '\0')) {
 		return;
 	}
--- a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c	Mon Oct 31 16:23:43 2005 -0800
@@ -556,7 +556,7 @@
 	int32_t status = PSVC_SUCCESS;
 	boolean_t present;
 	static char *sensor_id[DAKTARI_MAX_PS][DAK_MAX_PS_I_SENSORS];
-	static char *power_supply_id[DAKTARI_MAX_PS] = {{NULL}};
+	static char *power_supply_id[DAKTARI_MAX_PS] = {NULL};
 	int32_t i, j;
 	int32_t amps, oc_flag = 0, ps_present = 0;
 	static int32_t hi_warn[DAKTARI_MAX_PS][DAK_MAX_PS_I_SENSORS];
@@ -687,7 +687,7 @@
 int32_t
 psvc_ps_device_fail_notifier_policy_0(psvc_opaque_t hdlp, char *system)
 {
-	static char *ps_id[DAKTARI_MAX_PS] = {{NULL}};
+	static char *ps_id[DAKTARI_MAX_PS] = {NULL};
 	static char *sensor_id[DAKTARI_MAX_PS][DAK_MAX_FAULT_SENSORS];
 	char *led_id = "FSP_POWER_FAULT_LED";
 	int i, j;
@@ -886,7 +886,7 @@
 psvc_ps_check_and_disable_dr_policy_0(psvc_opaque_t hdlp, char *id)
 {
 	char		state[32];
-	static char	*name[DAKTARI_MAX_PS] = {{NULL}};
+	static char	*name[DAKTARI_MAX_PS] = {NULL};
 	int		ps_cnt = 0;
 	int		i, j;
 	int		dr_conf;
@@ -993,7 +993,7 @@
 int32_t
 psvc_fan_fault_check_policy_0(psvc_opaque_t hdlp, char *system)
 {
-	static char *fan_id[DAK_MAX_FANS] = {{NULL}};
+	static char *fan_id[DAK_MAX_FANS] = {NULL};
 	boolean_t enabled;
 	int32_t speed;
 	int32_t status = PSVC_SUCCESS;
@@ -1590,9 +1590,9 @@
 	int32_t		i;
 	char		curr_state[32], prev_state[32], led_state[32];
 	char		disk_fault[32], disk_state[32];
-	static char	*disk_id[DAK_MAX_DISKS] = {{NULL}};
-	static char	*led_id[DAK_MAX_DISKS] = {{NULL}};
-	static char	*parent_id[DAK_MAX_DISKS] = {{NULL}};
+	static char	*disk_id[DAK_MAX_DISKS] = {NULL};
+	static char	*led_id[DAK_MAX_DISKS] = {NULL};
+	static char	*parent_id[DAK_MAX_DISKS] = {NULL};
 	boolean_t	present;
 	int8_t		retry;
 
--- a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvd.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvd.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -1172,7 +1172,7 @@
 
 				observed = (tempr_t)
 				    datap->obs2exp_map[i].observed;
-				expected = expected = (tempr_t)
+				expected = (tempr_t)
 				    datap->obs2exp_map[i].expected;
 
 				/* ignore if duplicate entry */
--- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects.h	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects.h	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -100,46 +100,46 @@
 
 
 /* Device "feature" definitions */
-#define	PSVC_DEV_PERM		0x0000000000000001 /* Permanently in system */
-#define	PSVC_DEV_HOTPLUG	0x0000000000000002 /* Hot-pluggable device */
-#define	PSVC_DEV_OPTION	0x0000000000000004 /* Option (not hot-pluggable) */
-#define	PSVC_DEV_PRIMARY	0x0000000000000010 /* Primary device */
-#define	PSVC_DEV_SECONDARY	0x0000000000000020 /* Secondary device */
-#define	PSVC_DEV_RDONLY    	0x0000000000000100 /* Read only device */
-#define	PSVC_DEV_RDWR		0x0000000000000400 /* read/write device */
-#define	PSVC_DEV_FRU		0x0000000000000800 /* device is a FRU */
-#define	PSVC_LOW_WARN		0x0000000000001000
-#define	PSVC_LOW_SHUT		0x0000000000002000
-#define	PSVC_HIGH_WARN		0x0000000000004000
-#define	PSVC_HIGH_SHUT		0x0000000000008000
-#define	PSVC_CONVERSION_TABLE	0x0000000000010000 /* Conversion table */
-#define	PSVC_OPT_TEMP		0x0000000000020000 /* Optimal Temperature */
-#define	PSVC_HW_LOW_SHUT	0x0000000000040000
-#define	PSVC_HW_HIGH_SHUT	0x0000000000080000
-#define	PSVC_FAN_DRIVE_PR	0x0001000000000000
-#define	PSVC_TEMP_DRIVEN	0x0002000000000000 /* Temperature driven */
-#define	PSVC_SPEED_CTRL_PR	0x0004000000000000 /* Variable speed control */
-#define	PSVC_FAN_ON_OFF		0x0008000000000000 /* On/off fans */
-#define	PSVC_CLOSED_LOOP_CTRL	0x0010000000000000 /* Closed loop control */
-#define	PSVC_FAN_DRIVE_TABLE_PR 0x0010000000000000 /* oC to fan input table */
-#define	PSVC_DIE_TEMP		0x0001000000000000
-#define	PSVC_AMB_TEMP		0x0002000000000000
-#define	PSVC_DIGI_SENSOR	0x0100000000000000 /* A to D converter */
-#define	PSVC_BI_STATE		0x0001000000000000
-#define	PSVC_TRI_STATE		0x0002000000000000
-#define	PSVC_GREEN		0x0010000000000000
-#define	PSVC_AMBER		0x0020000000000000
-#define	PSVC_OUTPUT		0x0100000000000000
-#define	PSVC_INPUT		0x0200000000000000
-#define	PSVC_BIDIR		0x0400000000000000
-#define	PSVC_BIT_POS	0x0001000000000000 /* One bit per key positon */
-#define	PSVC_VAL_POS	0x0002000000000000 /* One value per key position */
-#define	PSVC_NORMAL_POS_AV	0x0010000000000000
-#define	PSVC_DIAG_POS_AV	0x0020000000000000
-#define	PSVC_LOCK_POS_AV	0x0040000000000000
-#define	PSVC_OFF_POS_AV		0x0080000000000000
-#define	PSVC_GPIO_PORT		0x0001000000000000
-#define	PSVC_GPIO_REG		0x0002000000000000
+#define	PSVC_DEV_PERM		0x0000000000000001ULL /* Permanently in sys */
+#define	PSVC_DEV_HOTPLUG	0x0000000000000002ULL /* Hot-pluggable device */
+#define	PSVC_DEV_OPTION	0x0000000000000004ULL /* Option (not hot-pluggable) */
+#define	PSVC_DEV_PRIMARY	0x0000000000000010ULL /* Primary device */
+#define	PSVC_DEV_SECONDARY	0x0000000000000020ULL /* Secondary device */
+#define	PSVC_DEV_RDONLY    	0x0000000000000100ULL /* Read only device */
+#define	PSVC_DEV_RDWR		0x0000000000000400ULL /* read/write device */
+#define	PSVC_DEV_FRU		0x0000000000000800ULL /* device is a FRU */
+#define	PSVC_LOW_WARN		0x0000000000001000ULL
+#define	PSVC_LOW_SHUT		0x0000000000002000ULL
+#define	PSVC_HIGH_WARN		0x0000000000004000ULL
+#define	PSVC_HIGH_SHUT		0x0000000000008000ULL
+#define	PSVC_CONVERSION_TABLE	0x0000000000010000ULL /* Conversion table */
+#define	PSVC_OPT_TEMP		0x0000000000020000ULL /* Optimal Temperature */
+#define	PSVC_HW_LOW_SHUT	0x0000000000040000ULL
+#define	PSVC_HW_HIGH_SHUT	0x0000000000080000ULL
+#define	PSVC_FAN_DRIVE_PR	0x0001000000000000ULL
+#define	PSVC_TEMP_DRIVEN	0x0002000000000000ULL /* Temperature driven */
+#define	PSVC_SPEED_CTRL_PR	0x0004000000000000ULL /* Variable speed ctrl */
+#define	PSVC_FAN_ON_OFF		0x0008000000000000ULL /* On/off fans */
+#define	PSVC_CLOSED_LOOP_CTRL	0x0010000000000000ULL /* Closed loop control */
+#define	PSVC_FAN_DRIVE_TABLE_PR 0x0010000000000000ULL /* oC to fan input tbl */
+#define	PSVC_DIE_TEMP		0x0001000000000000ULL
+#define	PSVC_AMB_TEMP		0x0002000000000000ULL
+#define	PSVC_DIGI_SENSOR	0x0100000000000000ULL /* A to D converter */
+#define	PSVC_BI_STATE		0x0001000000000000ULL
+#define	PSVC_TRI_STATE		0x0002000000000000ULL
+#define	PSVC_GREEN		0x0010000000000000ULL
+#define	PSVC_AMBER		0x0020000000000000ULL
+#define	PSVC_OUTPUT		0x0100000000000000ULL
+#define	PSVC_INPUT		0x0200000000000000ULL
+#define	PSVC_BIDIR		0x0400000000000000ULL
+#define	PSVC_BIT_POS	0x0001000000000000ULL /* One bit per key positon */
+#define	PSVC_VAL_POS	0x0002000000000000ULL /* One value per key position */
+#define	PSVC_NORMAL_POS_AV	0x0010000000000000ULL
+#define	PSVC_DIAG_POS_AV	0x0020000000000000ULL
+#define	PSVC_LOCK_POS_AV	0x0040000000000000ULL
+#define	PSVC_OFF_POS_AV		0x0080000000000000ULL
+#define	PSVC_GPIO_PORT		0x0001000000000000ULL
+#define	PSVC_GPIO_REG		0x0002000000000000ULL
 
 
 /* LED colors */
--- a/usr/src/cmd/rmformat/rmf_main.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/cmd/rmformat/rmf_main.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -74,7 +74,7 @@
 extern void my_perror(char *err_string);
 void process_options();
 
-
+int
 main(int32_t argc, char **argv)
 {
 	char i;
--- a/usr/src/cmd/smserverd/smediad.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/cmd/smserverd/smediad.c	Mon Oct 31 16:23:43 2005 -0800
@@ -1403,7 +1403,7 @@
 	if (dip == NULL) {
 		return;
 	}
-	door_dp = (door_data_t *)dip->di_data;
+	door_dp = (door_data_t *)(uintptr_t)dip->di_data;
 
 	debug(10, "entering my_create\n");
 
@@ -1427,7 +1427,7 @@
 		"pthread_attr_setdetachstate failed. errno = %d\n"),
 			errno);
 	ret_val = pthread_create(&tid, &attr, my_server_thread,
-		(void *)(dip->di_data));
+		(void *)(uintptr_t)(dip->di_data));
 
 	if (ret_val != 0) {
 		warning(gettext(
@@ -2764,7 +2764,7 @@
 
 
 /*ARGSUSED*/
-void
+int
 main(int argc, char **argv)
 {
 	int c;
@@ -2871,6 +2871,7 @@
 		(void) init_server(NULL);
 		for (;;) (void) pause();
 	}
+	return (0);
 }
 
 
--- a/usr/src/lib/efcode/engine/debug.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/lib/efcode/engine/debug.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2000-2003 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -812,7 +812,7 @@
 	uchar_t *byte;
 	int i;
 
-	log_message(MSG_INFO, "%p  ", (uint32_t)ptr);
+	log_message(MSG_INFO, "%p  ", ptr);
 	for (i = 0, byte = ptr; i < 16; i++) {
 		if (i == 8)
 			log_message(MSG_INFO, " ");
@@ -1048,7 +1048,7 @@
 	offset = ((long)data) & 0xf;
 	len += offset;
 	data = (uchar_t *)((long)data & ~0xf);
-	sprintf(buf, "%p", (uint32_t)data);
+	sprintf(buf, "%p", data);
 	print_bytes_header(strlen(buf), offset);
 	for (len += offset; len > 0; len -= 16, data += 16)
 		dump_line(data);
--- a/usr/src/lib/efcode/engine/env.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/lib/efcode/engine/env.c	Mon Oct 31 16:23:43 2005 -0800
@@ -67,7 +67,7 @@
 		if ((c >= 0x20 && c <= 0x7f) || c == '\n' || c == '\r' ||
 		    c == '\b')
 			putchar(c);
-		else if (c >= 0 && c < 0x20)
+		else if (c < 0x20)
 			printf("@%c", c + '@');
 		else
 			printf("\\%x", c);
--- a/usr/src/lib/efcode/engine/mcookie.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/lib/efcode/engine/mcookie.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2000-2003 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -155,6 +155,8 @@
 	}
 	log_message(MSG_WARN, "Warning: mcookie_to_rlen: invalid"
 	    " mcookie: %llx\n", (uint64_t)mcookie);
+
+	return (0);
 }
 
 fstack_t
@@ -172,6 +174,8 @@
 	}
 	log_message(MSG_WARN, "Warning: mcookie_to_rvirt: invalid"
 	    " mcookie: %llx\n", (uint64_t)mcookie);
+
+	return (0);
 }
 
 static void
--- a/usr/src/uts/common/pcmcia/nexus/pcmcia.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/common/pcmcia/nexus/pcmcia.c	Mon Oct 31 16:23:43 2005 -0800
@@ -4668,7 +4668,7 @@
 	handler.handler = (f_tt *)hdlp->ih_cb_func;
 	handler.arg1 = hdlp->ih_cb_arg1;
 	handler.arg2 = hdlp->ih_cb_arg2;
-	handler.handler_id = (uint32_t)rdip;
+	handler.handler_id = (uint32_t)(uintptr_t)rdip;
 
 	/*
 	 * check if multifunction and do the right thing
@@ -4692,7 +4692,7 @@
 			return (DDI_FAILURE);
 		}
 		intr->intr = hdlp->ih_cb_func;
-		intr->handler_id = (uint_t)rdip;
+		intr->handler_id = (uint_t)(uintptr_t)rdip;
 		intr->arg1 = hdlp->ih_cb_arg1;
 		intr->arg2 = hdlp->ih_cb_arg2;
 		intr->socket = socket;
@@ -4763,7 +4763,7 @@
 #endif
 
 	if (!(sockp->ls_flags & PCS_COOKIES_VALID)) {
-		hdlp->ih_pri = (uint_t)*handler.iblk_cookie;
+		hdlp->ih_pri = (uint_t)(uintptr_t)*handler.iblk_cookie;
 		sockp->ls_iblk = *handler.iblk_cookie;
 		sockp->ls_idev = *handler.idev_cookie;
 		sockp->ls_flags |= PCS_COOKIES_VALID;
@@ -4815,7 +4815,7 @@
 
 		/* Check if there is only one handler left */
 		if ((intr->next == intr) && (intr->prev == intr)) {
-			if (intr->handler_id == (unsigned)rdip) {
+			if (intr->handler_id == (unsigned)(uintptr_t)rdip) {
 				sockp->ls_inthandlers = NULL;
 				remhandler++;
 				kmem_free(intr, sizeof (inthandler_t));
@@ -4827,7 +4827,8 @@
 			for (done = 0, first = intr; !done; intr = intr->next) {
 				if (intr->next == first)
 					done++;
-				if (intr->handler_id == (unsigned)rdip) {
+				if (intr->handler_id ==
+				    (unsigned)(uintptr_t)rdip) {
 					done++;
 
 					/*
@@ -4867,7 +4868,7 @@
 #endif
 
 	handler.socket = sockp->ls_socket;
-	handler.handler_id = (uint32_t)rdip;
+	handler.handler_id = (uint32_t)(uintptr_t)rdip;
 	handler.handler = (f_tt *)pispec->intrspec_func;
 	CLEAR_IRQ(sockp->ls_if, dip, &handler);
 }
--- a/usr/src/uts/sun/io/scsi/adapters/fas.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/sun/io/scsi/adapters/fas.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -6487,6 +6487,7 @@
 		return (ACTION_RESET);
 	}
 	/*NOTREACHED*/
+	return (ACTION_RETURN);
 }
 
 /*
--- a/usr/src/uts/sun/io/stp4020.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/sun/io/stp4020.c	Mon Oct 31 16:23:43 2005 -0800
@@ -232,7 +232,7 @@
 	int ret;
 
 	mutex_init(&stpra_lock, NULL, MUTEX_DRIVER,
-			(void *)__ipltospl(SPL7 - 1));
+			(void *)(uintptr_t)__ipltospl(SPL7 - 1));
 	if ((ret = mod_install(&modlinkage)) != 0) {
 		mutex_destroy(&stpra_lock);
 	}
@@ -374,7 +374,7 @@
 
 #if defined(DRT_DEBUG)
 	if (drt_debug)
-		cmn_err(CE_CONT, "drt_attach: drt=%x\n", (int)drt);
+		cmn_err(CE_CONT, "drt_attach: drt=%p\n", drt);
 #endif
 	drt_nexus = (struct pcmcia_adapter_nexus_private *)
 		kmem_zalloc(sizeof (struct pcmcia_adapter_nexus_private),
@@ -399,8 +399,8 @@
 	}
 #if defined(DRT_DEBUG)
 	if (drt_debug) {
-		cmn_err(CE_CONT, "drt_attach: %x->%x\n", DRMAP_ASIC_CSRS,
-				(int)drt->pc_csr);
+		cmn_err(CE_CONT, "drt_attach: %x->%p\n", DRMAP_ASIC_CSRS,
+				drt->pc_csr);
 	}
 #endif
 
@@ -620,7 +620,7 @@
 		cmn_err(CE_CONT, "drt_callback: drt=%x, lock=%x\n",
 						(int)drt, (int)drt->pc_lock);
 #endif
-		cmn_err(CE_CONT, "\thandler=%x, arg=%x\n", handler, arg);
+		cmn_err(CE_CONT, "\thandler=%p, arg=%x\n", handler, arg);
 	}
 #endif
 	if (handler != NULL) {
@@ -805,7 +805,7 @@
 		winp->drtw_flags &= ~(DRW_MAPPED|DRW_ENABLED);
 		if (prevstate & DRW_IO) {
 			stpra_free(&sockp->drt_iomap,
-				    (uint32_t)winp->drtw_reqaddr,
+				    (uint32_t)(uintptr_t)winp->drtw_reqaddr,
 				    (uint32_t)winp->drtw_len);
 		}
 		winp->drtw_base = NULL;
@@ -850,14 +850,14 @@
 #if defined(DRT_DEBUG)
 			if (drt_debug)
 				cmn_err(CE_CONT,
-					"\tmapped: handle = 0x%x base = %x, "
+					"\tmapped: handle = 0x%p base = %p, "
 					"len=%x\n",
-					(int)winp->drtw_handle,
-					(int)winp->drtw_base,
+					winp->drtw_handle,
+					winp->drtw_base,
 					(int)window->WindowSize);
 #endif
 		}
-		winp->drtw_reqaddr = (caddr_t)window->base;
+		winp->drtw_reqaddr = (caddr_t)(uintptr_t)window->base;
 		winp->drtw_flags |= DRW_MAPPED | DRW_ENABLED;
 
 		if (!(window->state & WS_IO)) {
@@ -894,11 +894,11 @@
 #if defined(DRT_DEBUG)
 	if (drt_debug) {
 		cmn_err(CE_CONT,
-			"\tbase now set to %x (->%x), csrp=%x, winreg=%x"
+			"\tbase now set to %p (->%p), csrp=%p, winreg=%p"
 			", len=%x\n",
-			(int)window->handle,
-			(int)winp->drtw_base, (int)csrp,
-			(int)&csrp->window[win].ctl0,
+			window->handle,
+			winp->drtw_base, csrp,
+			&csrp->window[win].ctl0,
 			(int)window->WindowSize);
 		cmn_err(CE_CONT,
 			"\twindow type is now %s\n", window->state & WS_IO ?
@@ -927,9 +927,9 @@
 	value = drt->pc_csr->socket[socket].stat0;
 #if defined(DRT_DEBUG)
 	if (drt_debug) {
-		cmn_err(CE_CONT, "drt_card_state: socket=%d, *lock=%x\n",
-			socket, (int)&drt->pc_lock);
-		cmn_err(CE_CONT, "\tcsr@%x\n", (int)drt->pc_csr);
+		cmn_err(CE_CONT, "drt_card_state: socket=%d, *lock=%p\n",
+			socket, &drt->pc_lock);
+		cmn_err(CE_CONT, "\tcsr@%p\n", drt->pc_csr);
 
 		cmn_err(CE_CONT, "\tstat0=%b\n", value,
 			"\020\1PWRON\2WAIT\3WP\4RDYBSY\5BVD1\6BVD2\7CD1"
@@ -938,9 +938,9 @@
 		cmn_err(CE_CONT,
 			"\tstat1=%x\n",
 			(int)drt->pc_csr->socket[socket].stat1);
-		cmn_err(CE_CONT, "\t&stat0=%x, &stat1=%x\n",
-			(int)&drt->pc_csr->socket[socket].stat0,
-			(int)&drt->pc_csr->socket[socket].stat1);
+		cmn_err(CE_CONT, "\t&stat0=%p, &stat1=%p\n",
+			&drt->pc_csr->socket[socket].stat0,
+			&drt->pc_csr->socket[socket].stat1);
 	}
 #endif
 
@@ -1049,10 +1049,10 @@
 	/* The actual PC Card address mapping */
 #if defined(DRT_DEBUG)
 	if (drt_debug)
-		cmn_err(CE_CONT, "\ta2p=%x, base=%x, csrp=%x\n",
+		cmn_err(CE_CONT, "\ta2p=%x, base=%x, csrp=%p\n",
 			(int)ADDR2PAGE(page->offset),
 			SET_DRWIN_BASE(ADDR2PAGE(page->offset)),
-			(int)csrp);
+			csrp);
 #endif
 	which |= SET_DRWIN_BASE(ADDR2PAGE(page->offset));
 	winp->drtw_addr = (caddr_t)page->offset;
@@ -1079,12 +1079,12 @@
 #if defined(DRT_DEBUG)
 	if (drt_debug) {
 		cmn_err(CE_CONT,
-			"\tpage offset=%x, base=%x (PC addr=%x, sockets=%d)\n",
-			(int)page->offset, (int)winp->drtw_base,
-			(int)winp->drtw_addr, drt->pc_numsockets);
-		cmn_err(CE_CONT, "\t*base=%x, win reg=%x\n",
+			"\tpage offset=%x, base=%p (PC addr=%p, sockets=%d)\n",
+			(int)page->offset, winp->drtw_base,
+			winp->drtw_addr, drt->pc_numsockets);
+		cmn_err(CE_CONT, "\t*base=%x, win reg=%p\n",
 			*(ushort_t *)winp->drtw_base,
-			(int)&csrp->window[win].ctl0);
+			&csrp->window[win].ctl0);
 		if (drt_debug > 1)
 			drt_dmp_regs(csrp);
 	}
@@ -1331,8 +1331,8 @@
 	mem->LastByte = (baseaddr_t)winp->drtw_base + DRWINSIZE;
 #if defined(DRT_DEBUG)
 	if (drt_debug) {
-	    cmn_err(CE_CONT, "\tFirstByte=%x, LastByte=%x\n",
-		    (int)mem->FirstByte, (int)mem->LastByte);
+	    cmn_err(CE_CONT, "\tFirstByte=%p, LastByte=%p\n",
+		    mem->FirstByte, mem->LastByte);
 	}
 #endif
 	mem->MinSize = DRWINSIZE;
@@ -1442,7 +1442,7 @@
 	drt_dev_t *drt = drt_get_driver_private(dip);
 #if defined(DRT_DEBUG)
 	if (drt_debug) {
-		cmn_err(CE_CONT, "drt_get_status: drt=%x\n", (int)drt);
+		cmn_err(CE_CONT, "drt_get_status: drt=%p\n", drt);
 	}
 #endif
 
@@ -1491,7 +1491,7 @@
 
 	window->size = winp->drtw_len;
 	window->speed = winp->drtw_speed;
-	window->base = (uint32_t)winp->drtw_reqaddr;
+	window->base = (uint32_t)(uintptr_t)winp->drtw_reqaddr;
 	window->handle = winp->drtw_handle;
 	window->state = 0;
 
@@ -1739,8 +1739,8 @@
 
 #if defined(DRT_DEBUG)
 	if (drt_debug > 2)
-		cmn_err(CE_CONT, "drt_do_intr(%x, %d, %d)\n", (int)drt,
-							socket, priority);
+		cmn_err(CE_CONT, "drt_do_intr(%p, %d, %d)\n", drt, socket,
+							priority);
 #endif
 
 	/*
@@ -1768,7 +1768,7 @@
 #if defined(DRT_DEBUG)
 		if (drt_debug > 2)
 			cmn_err(CE_CONT,
-				"\tintr-> socket=%d, priority=%d, intr=%x,"
+				"\tintr-> socket=%d, priority=%d, intr=%p,"
 				"arg1=%p arg2=%p (drt_flags=%x:%s)\n",
 				intr->socket, intr->priority, intr->intr,
 				intr->arg1, intr->arg2,
@@ -2065,7 +2065,7 @@
 
 #if defined(DRT_DEBUG)
 	if (drt_debug)
-		cmn_err(CE_CONT, "drt_lo_intr(%x)\n", (int)arg);
+		cmn_err(CE_CONT, "drt_lo_intr(%p)\n", arg);
 #endif
 	/*
 	 * we need to look at all known sockets to determine
@@ -2142,7 +2142,7 @@
 {
 	int i;
 
-	cmn_err(CE_CONT, "drt_dmp_regs (%x):\n", (int)csrp);
+	cmn_err(CE_CONT, "drt_dmp_regs (%p):\n", csrp);
 	cmn_err(CE_CONT, "\tctl0: %b\n", csrp->ctl0,
 		"\020\1IFTYPE\2SFTRST\3SPKREN\4IOILVL\5IOIE\6RSVD"
 		"\7CTOIE\010WPIE\011RDYIE\012BVD1IE\013BVD2IE\014CDIE"
--- a/usr/src/uts/sun/io/zs_async.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/sun/io/zs_async.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -569,7 +569,7 @@
 		error = DDI_SUCCESS;
 		break;
 	case DDI_INFO_DEVT2INSTANCE:
-		*result = (void *)(unit / 2);
+		*result = (void *)(uintptr_t)(unit / 2);
 		error = DDI_SUCCESS;
 		break;
 	default:
--- a/usr/src/uts/sun/io/zs_hdlc.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/sun/io/zs_hdlc.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -459,7 +459,7 @@
 		}
 		break;
 	case DDI_INFO_DEVT2INSTANCE:
-		*result = (void *)(unit / 2);
+		*result = (void *)(uintptr_t)(unit / 2);
 		error = DDI_SUCCESS;
 		break;
 	default:
--- a/usr/src/uts/sun/sys/dada/impl/udcd.h	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/sun/sys/dada/impl/udcd.h	Mon Oct 31 16:23:43 2005 -0800
@@ -20,8 +20,8 @@
  * CDDL HEADER END
  */
 /*
- * Copyright (c) 1996-2000 by Sun Microsystems Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
  */
 
 #ifndef	_SYS_DADA_IMPL_UDCD_H
@@ -74,9 +74,9 @@
 	ucmd->udcd_flags	= u32->udcd_flags;			\
 	ucmd->udcd_resid	= u32->udcd_resid;			\
 	ucmd->udcd_buflen	= u32->udcd_buflen;			\
-	ucmd->udcd_bufaddr	= (caddr_t)u32->udcd_bufaddr;		\
-	ucmd->udcd_cmd		= (struct  dcd_cmd *)u32->udcd_cmd;	\
-	ucmd->udcd_reserved	= (caddr_t)u32->udcd_reserved;		\
+	ucmd->udcd_bufaddr	= (caddr_t)(uintptr_t)u32->udcd_bufaddr; \
+	ucmd->udcd_cmd		= (struct  dcd_cmd *)(uintptr_t)u32->udcd_cmd; \
+	ucmd->udcd_reserved	= (caddr_t)(uintptr_t)u32->udcd_reserved; \
 	ucmd->version_no	= u32->version_no;
 
 #define	udcd_cmdtoudcd_cmd32(ucmd, u32)					\
@@ -87,9 +87,9 @@
 	u32->udcd_flags		= ucmd->udcd_flags;			\
 	u32->udcd_resid		= ucmd->udcd_resid;			\
 	u32->udcd_buflen	= ucmd->udcd_buflen;			\
-	u32->udcd_bufaddr	= (caddr32_t)ucmd->udcd_bufaddr;	\
-	u32->udcd_cmd		= (caddr32_t)ucmd->udcd_cmd;		\
-	u32->udcd_reserved	= (caddr32_t)ucmd->udcd_reserved;	\
+	u32->udcd_bufaddr	= (caddr32_t)(uintptr_t)ucmd->udcd_bufaddr; \
+	u32->udcd_cmd		= (caddr32_t)(uintptr_t)ucmd->udcd_cmd;	\
+	u32->udcd_reserved	= (caddr32_t)(uintptr_t)ucmd->udcd_reserved; \
 	u32->version_no		= ucmd->version_no;
 
 #endif /* _SYSCALL32 */
--- a/usr/src/uts/sun4/io/ebus.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/sun4/io/ebus.c	Mon Oct 31 16:23:43 2005 -0800
@@ -248,7 +248,7 @@
 
 	switch (infocmd) {
 	case DDI_INFO_DEVT2INSTANCE:
-		*result = (void *)instance;
+		*result = (void *)(uintptr_t)instance;
 		break;
 	case DDI_INFO_DEVT2DEVINFO:
 		if (ebus_p == NULL)
--- a/usr/src/uts/sun4/io/su_driver.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/sun4/io/su_driver.c	Mon Oct 31 16:23:43 2005 -0800
@@ -841,7 +841,7 @@
 		}
 		break;
 	    case DDI_INFO_DEVT2INSTANCE:
-		*result = (void *)instance;
+		*result = (void *)(uintptr_t)instance;
 		error = DDI_SUCCESS;
 		break;
 	    default:
--- a/usr/src/uts/sun4u/excalibur/io/xcalppm.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/sun4u/excalibur/io/xcalppm.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
@@ -417,17 +417,18 @@
 		return;
 	}
 
-	if ((int)action == PPM_LEDON) {
+	if ((int)(uintptr_t)action == PPM_LEDON) {
 		new_action = PPM_LEDOFF;
 		intvl = PPM_LEDOFF_INTERVAL;
 	} else {
-		ASSERT((int)action == PPM_LEDOFF);
+		ASSERT((int)(uintptr_t)action == PPM_LEDOFF);
 		new_action = PPM_LEDON;
 		intvl = PPM_LEDON_INTERVAL;
 	}
 
 	xcppm_set_led(new_action);
-	unitp->led_tid = timeout(xcppm_blink_led, (void *)new_action, intvl);
+	unitp->led_tid = timeout(xcppm_blink_led, (void *)(uintptr_t)new_action,
+	    intvl);
 	mutex_exit(&unitp->unit_lock);
 }
 
@@ -438,7 +439,8 @@
 	xcppm_unit_t *unitp;
 	timeout_id_t tid;
 
-	DPRINTF(D_LOWEST, ("xcppm_freeze_led: action %d\n", (int)action));
+	DPRINTF(D_LOWEST, ("xcppm_freeze_led: action %d\n",
+	    (int)(uintptr_t)action));
 	unitp = ddi_get_soft_state(ppm_statep, ppm_inst);
 	mutex_enter(&unitp->unit_lock);
 	tid = unitp->led_tid;
@@ -446,7 +448,7 @@
 	mutex_exit(&unitp->unit_lock);
 	untimeout(tid);
 	mutex_enter(&unitp->unit_lock);
-	xcppm_set_led((int)action);
+	xcppm_set_led((int)(uintptr_t)action);
 	mutex_exit(&unitp->unit_lock);
 }
 
@@ -1173,7 +1175,7 @@
 
 #ifdef DEBUG
 	if (flags & ~(XCPPMF_PCIB|XCPPMF_UPA))
-		DPRINTF(D_ERROR, ("%s: invalid ppmd->flags value 0x%x\n",
+		DPRINTF(D_ERROR, ("%s: invalid ppmd->flags value 0x%x\n", str,
 		    ppmd->flags));
 #endif
 
--- a/usr/src/uts/sun4u/excalibur/io/xcalwd.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/sun4u/excalibur/io/xcalwd.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2001-2003 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -217,7 +217,7 @@
 		}
 		break;
 	case DDI_INFO_DEVT2INSTANCE:
-		*resultp = (void *)getminor(dev);
+		*resultp = (void *)(uintptr_t)getminor(dev);
 		retval = DDI_SUCCESS;
 		break;
 	default:
@@ -306,7 +306,7 @@
 static void
 xcalwd_timeout(void *arg)
 {
-	int	instance = (int)arg;
+	int	instance = (int)(uintptr_t)arg;
 	xcalwd_state_t	*tsp;
 
 	if (instance < 0)
@@ -456,7 +456,7 @@
 		}
 		tsp->intvl = intvl;
 		tsp->tid = realtime_timeout(xcalwd_timeout,
-		    (void *)instance,
+		    (void *)(uintptr_t)instance,
 		    drv_usectohz(1000000) * tsp->intvl);
 		tsp->started = B_TRUE;
 		mutex_exit(&tsp->lock);
@@ -473,7 +473,7 @@
 		mutex_enter(&tsp->lock);
 		if (tsp->started == B_TRUE)	/* reinstate */
 			tsp->tid = realtime_timeout(xcalwd_timeout,
-			    (void *)instance,
+			    (void *)(uintptr_t)instance,
 			    drv_usectohz(1000000) * tsp->intvl);
 		mutex_exit(&tsp->lock);
 		return (0);
--- a/usr/src/uts/sun4u/starfire/os/starfire.c	Mon Oct 31 16:06:29 2005 -0800
+++ b/usr/src/uts/sun4u/starfire/os/starfire.c	Mon Oct 31 16:23:43 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -118,7 +118,7 @@
 		 * Versions 5 to 50 and 150 or above  can support this OS
 		 */
 		sprintf(buf, "cpu-prom-version swap l!");
-		prom_interpret(buf, (uint32_t)&revlevel, 0, 0, 0, 0);
+		prom_interpret(buf, (uintptr_t)&revlevel, 0, 0, 0, 0);
 		if ((revlevel < 5) || ((revlevel > 50) && (revlevel < 150)))
 			halt("Firmware upgrade is required to boot this OS!");
 	}