3063 many instances of unlike enum comparison
authorRichard Lowe <richlowe@richlowe.net>
Sun, 08 Jul 2012 03:19:56 +0100
changeset 13837 bf40125f4b37
parent 13836 e6b6968147fd
child 13838 6da32a929222
3063 many instances of unlike enum comparison Reviewed by: Robert Mustacchi <[email protected]> Approved by: Garrett D'Amore <[email protected]>
usr/src/cmd/cmd-inet/usr.lib/ilbd/ilbd_rules.c
usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_nlm.c
usr/src/cmd/fs.d/autofs/autod_nfs.c
usr/src/cmd/fs.d/nfs/mount/mount.c
usr/src/cmd/mdb/common/modules/smbsrv/smbsrv.c
usr/src/cmd/pcidr/plugins/default/pcidr_cfga.c
usr/src/lib/cfgadm_plugins/fp/common/cfga_fp.c
usr/src/lib/cfgadm_plugins/ib/common/cfga_ib.c
usr/src/lib/cfgadm_plugins/sata/common/cfga_sata.c
usr/src/lib/krb5/plugins/preauth/pkinit/pkinit_srv.c
usr/src/lib/libsun_ima/common/ima.c
usr/src/lib/lvm/libmeta/common/meta_smf.c
usr/src/lib/lvm/libmeta/common/meta_trans.c
usr/src/uts/common/fs/nfs/nfs3_xdr.c
usr/src/uts/common/fs/nfs/nfs4_xdr.c
usr/src/uts/common/fs/nfs/nfs_server.c
usr/src/uts/common/fs/sockfs/nl7chttp.c
usr/src/uts/common/io/ib/mgt/ibcm/ibcm_ti.c
usr/src/uts/common/io/scsi/targets/st.c
usr/src/uts/common/io/softmac/softmac_main.c
usr/src/uts/common/sys/softmac_impl.h
usr/src/uts/i86pc/io/pci/pci.c
usr/src/uts/intel/io/heci/heci_intr.c
--- a/usr/src/cmd/cmd-inet/usr.lib/ilbd/ilbd_rules.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/cmd/cmd-inet/usr.lib/ilbd/ilbd_rules.c	Sun Jul 08 03:19:56 2012 +0100
@@ -343,8 +343,8 @@
 			return (rc);
 		if (rinfo->rl_conndrain == 0)
 			rinfo->rl_conndrain = tmp_info.rl_conndrain;
-		if ((rinfo->rl_topo == ILB_TOPO_IMPL_NAT ||
-		    rinfo->rl_topo == ILB_TOPO_IMPL_HALF_NAT) &&
+		if ((rinfo->rl_topo == ILB_TOPO_NAT ||
+		    rinfo->rl_topo == ILB_TOPO_HALF_NAT) &&
 		    rinfo->rl_nat_timeout == 0) {
 			rinfo->rl_nat_timeout = tmp_info.rl_nat_timeout;
 		}
--- a/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_nlm.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_nlm.c	Sun Jul 08 03:19:56 2012 +0100
@@ -24,8 +24,6 @@
  * All rights reserved.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <setjmp.h>
 #include <string.h>
@@ -466,8 +464,8 @@
 
 	s = (enum nlm_stats) getxdr_u_long();
 	(void) sprintf(get_line(0, 0),
-		"Status = %d (%s)",
-		s, nameof_stat((ulong_t)s));
+	    "Status = %d (%s)",
+	    s, nameof_stat((ulong_t)s));
 
 	return (s);
 }
@@ -653,8 +651,8 @@
 
 	m = (enum fsh_mode) getxdr_u_long();
 	(void) sprintf(get_line(0, 0),
-		"Mode = %d (%s)",
-		m, nameof_mode((uint_t)m));
+	    "Mode = %d (%s)",
+	    m, nameof_mode((uint_t)m));
 }
 
 static void
@@ -664,8 +662,8 @@
 
 	a = (enum fsh_access) getxdr_u_long();
 	(void) sprintf(get_line(0, 0),
-		"Access = %d (%s)",
-		a, nameof_access((uint_t)a));
+	    "Access = %d (%s)",
+	    a, nameof_access((uint_t)a));
 }
 
 static char *
@@ -1105,8 +1103,8 @@
 
 	s = (enum nlm4_stats) getxdr_u_long();
 	(void) sprintf(get_line(0, 0),
-		"Status = %d (%s)",
-		s, nameof_stat4((ulong_t)s));
+	    "Status = %d (%s)",
+	    s, nameof_stat4((ulong_t)s));
 
 	return (s);
 }
@@ -1115,7 +1113,7 @@
 show_testres4()
 {
 	show_netobj("Cookie = %s");
-	if (show_stat() == NLM4_DENIED) {
+	if (show_stat() == nlm_denied) {
 		showxdr_bool("Exclusive = %s");
 		showxdr_long("Svid = %ld (process id)");
 		show_netobj("Owner handle = %s");
--- a/usr/src/cmd/fs.d/autofs/autod_nfs.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/cmd/fs.d/autofs/autod_nfs.c	Sun Jul 08 03:19:56 2012 +0100
@@ -3128,7 +3128,7 @@
 		memset((char *)&res, 0, sizeof (wnl_diropres));
 		arg.name = fspath;
 		if (wnlproc_lookup_2(&arg, &res, cl) !=
-		    RPC_SUCCESS || res.status != NFS_OK)
+		    RPC_SUCCESS || res.status != WNL_OK)
 			goto done;
 		*fhp = malloc(sizeof (wnl_fh));
 
@@ -3153,7 +3153,7 @@
 		memset((char *)&res, 0, sizeof (WNL_LOOKUP3res));
 		arg.what.name = fspath;
 		if (wnlproc3_lookup_3(&arg, &res, cl) !=
-		    RPC_SUCCESS || res.status != NFS3_OK)
+		    RPC_SUCCESS || res.status != WNL3_OK)
 			goto done;
 
 		fh3p = (nfs_fh3 *)malloc(sizeof (*fh3p));
--- a/usr/src/cmd/fs.d/nfs/mount/mount.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/cmd/fs.d/nfs/mount/mount.c	Sun Jul 08 03:19:56 2012 +0100
@@ -1588,7 +1588,7 @@
 			arg.name = fspath;
 			memset((char *)&res, 0, sizeof (wnl_diropres));
 			if (wnlproc_lookup_2(&arg, &res, cl) !=
-			    RPC_SUCCESS || res.status != NFS_OK)
+			    RPC_SUCCESS || res.status != WNL_OK)
 				goto done;
 
 			*fhp = malloc(sizeof (wnl_fh));
@@ -1610,7 +1610,7 @@
 			arg.what.name = fspath;
 			memset((char *)&res, 0, sizeof (WNL_LOOKUP3res));
 			if (wnlproc3_lookup_3(&arg, &res, cl) !=
-			    RPC_SUCCESS || res.status != NFS3_OK)
+			    RPC_SUCCESS || res.status != WNL3_OK)
 				goto done;
 
 			fh3p = (nfs_fh3 *)malloc(sizeof (*fh3p));
--- a/usr/src/cmd/mdb/common/modules/smbsrv/smbsrv.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/cmd/mdb/common/modules/smbsrv/smbsrv.c	Sun Jul 08 03:19:56 2012 +0100
@@ -1237,7 +1237,7 @@
 		if (opts & SMB_OPT_VERBOSE) {
 			const char	*state;
 
-			if (of->f_state >= SMB_ODIR_STATE_SENTINEL)
+			if (of->f_state >= SMB_OFILE_STATE_SENTINEL)
 				state = "INVALID";
 			else
 				state = smb_ofile_state[of->f_state];
--- a/usr/src/cmd/pcidr/plugins/default/pcidr_cfga.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/cmd/pcidr/plugins/default/pcidr_cfga.c	Sun Jul 08 03:19:56 2012 +0100
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <string.h>
 #include <sys/param.h>
 #include <assert.h>
@@ -65,7 +63,7 @@
 
 
 static struct {
-	cfga_stat_t cmd;
+	cfga_cmd_t cmd;
 	char *name;
 } pcidr_cfga_cmd_nametab[] = {
 	{CFGA_CMD_NONE, "CFGA_CMD_NONE"},
--- a/usr/src/lib/cfgadm_plugins/fp/common/cfga_fp.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/lib/cfgadm_plugins/fp/common/cfga_fp.c	Sun Jul 08 03:19:56 2012 +0100
@@ -23,9 +23,6 @@
  * Use is subject to license terms.
  */
 
-
-
-
 #include "cfga_fp.h"
 
 /*
@@ -70,11 +67,11 @@
 
 	/* Only configure and unconfigure operations are supported */
 	if (state_change_cmd != CFGA_CMD_CONFIGURE &&
-				state_change_cmd != CFGA_CMD_UNCONFIGURE) {
+	    state_change_cmd != CFGA_CMD_UNCONFIGURE) {
 		return (CFGA_OPNOTSUPP);
 	}
 
-	if ((ret = apidt_create(ap_id, &apidt, errstring)) != CFGA_OK) {
+	if ((ret = apidt_create(ap_id, &apidt, errstring)) != FPCFGA_OK) {
 		return (err_cvt(ret));
 	}
 
@@ -84,7 +81,8 @@
 		hw_option_p = hw_option;
 		/* Use getsubopt() if more options get added */
 		while (*hw_option_p != '\0') {
-		    switch (getsubopt(&hw_option_p, fp_cs_hw_opts, &value)) {
+			switch (getsubopt(&hw_option_p, fp_cs_hw_opts,
+			    &value)) {
 			case OPT_DISABLE_RCM :
 				apidt.flags |= FLAG_DISABLE_RCM;
 				break;
@@ -98,7 +96,7 @@
 			case OPT_REMOVE_UNUSABLE_SCSI_LUN:
 				if (state_change_cmd != CFGA_CMD_UNCONFIGURE) {
 					cfga_err(errstring, 0, ERRARG_OPT_INVAL,
-						options, 0);
+					    options, 0);
 					S_FREE(hw_option);
 					apidt_free(&apidt);
 					return (CFGA_ERROR);
@@ -108,11 +106,11 @@
 			default :
 				/* process unknonw option. */
 				cfga_err(errstring, 0, ERRARG_OPT_INVAL,
-					options, 0);
+				    options, 0);
 				S_FREE(hw_option);
 				apidt_free(&apidt);
 				return (CFGA_ERROR);
-		    }
+			}
 		}
 		S_FREE(hw_option);
 	}
@@ -138,15 +136,15 @@
 		if ((ret = findMatchingAdapterPort(apidt.xport_phys,
 		    &handle, &portIndex, &portAttrs, errstring)) ==
 		    FPCFGA_OK) {
-		    ret = dev_change_state(state_change_cmd, &apidt, &pwwn,
-				flags, errstring, handle, portAttrs);
-		    HBA_CloseAdapter(handle);
-		    HBA_FreeLibrary();
+			ret = dev_change_state(state_change_cmd, &apidt, &pwwn,
+			    flags, errstring, handle, portAttrs);
+			HBA_CloseAdapter(handle);
+			HBA_FreeLibrary();
 		}
 	} else {
 		/* Change state of all devices on FCA and the FCA itself */
 		ret = fca_change_state(state_change_cmd, &apidt,
-							flags, errstring);
+		    flags, errstring);
 	}
 
 	apidt_free(&apidt);
@@ -241,7 +239,8 @@
 		hw_option_p = hw_option;
 		/* Use getsubopt() if more options get added */
 		while (*hw_option_p != '\0') {
-		    switch (getsubopt(&hw_option_p, fp_list_hw_opts, &value)) {
+			switch (getsubopt(&hw_option_p, fp_list_hw_opts,
+			    &value)) {
 			case OPT_DEVINFO_FORCE :
 				fp_flags |= FLAG_DEVINFO_FORCE;
 				break;
@@ -252,17 +251,17 @@
 			default :
 				/* process unknonw option. */
 				cfga_err(errstring, 0, ERRARG_OPT_INVAL,
-					options, 0);
+				    options, 0);
 				S_FREE(hw_option);
 			return (CFGA_ERROR);
-		    }
+			}
 		}
 		S_FREE(hw_option);
 	}
 
 	/* if force_devinfo is specified check uid = 0 or not. */
 	if (((fp_flags & FLAG_DEVINFO_FORCE) == FLAG_DEVINFO_FORCE) &&
-			(geteuid() != 0)) {
+	    (geteuid() != 0)) {
 		return (CFGA_PRIV);
 	}
 
@@ -294,14 +293,14 @@
 
 	if ((fp_flags & FLAG_FCP_DEV) == FLAG_FCP_DEV) {
 		ret = do_list_FCP_dev(ap_id, fp_flags, cmd, &ldatalistp, &nelem,
-			errstring);
+		    errstring);
 		if (ret != FPCFGA_OK) {
 			list_free(&ldatalistp);
 			return (err_cvt(ret));
 		}
 	} else {
 		if ((ret = apidt_create(ap_id, &apidt, errstring))
-				!= FPCFGA_OK) {
+		    != FPCFGA_OK) {
 			return (err_cvt(ret));
 		}
 
@@ -371,10 +370,10 @@
 		i++;
 
 	if ((ap_id1[i] == '\0') &&
-		!(strncmp(&ap_id2[i], LUN_COMP_SEP, strlen(LUN_COMP_SEP)))) {
+	    !(strncmp(&ap_id2[i], LUN_COMP_SEP, strlen(LUN_COMP_SEP)))) {
 		return (0);
 	} else if ((ap_id2[i] == '\0') &&
-		!(strncmp(&ap_id1[i], LUN_COMP_SEP, strlen(LUN_COMP_SEP)))) {
+	    !(strncmp(&ap_id1[i], LUN_COMP_SEP, strlen(LUN_COMP_SEP)))) {
 		return (0);
 	}
 
@@ -388,7 +387,7 @@
 
 		if (isxdigit(ap_id1[i]) && isxdigit(ap_id2[i])) {
 			ret = (strtoll((ap_id1 + i), NULL, 16)) -
-				(strtoll((ap_id2 + i), NULL, 16));
+			    (strtoll((ap_id2 + i), NULL, 16));
 			if (ret > 0) {
 				return (1);
 			} else if (ret < 0) {
--- a/usr/src/lib/cfgadm_plugins/ib/common/cfga_ib.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/lib/cfgadm_plugins/ib/common/cfga_ib.c	Sun Jul 08 03:19:56 2012 +0100
@@ -1557,7 +1557,7 @@
 
 	/* Get /dev/cfg path to corresponding to the physical ap_id */
 	/* Remember ap_id_log must be freed */
-	if ((cfga_ib_ret_t)ib_physpath_to_devlink(ap_id, &ap_id_log,
+	if (ib_physpath_to_devlink(ap_id, &ap_id_log,
 	    &l_err) != ICFGA_OK) {
 		DPRINTF("ib_fill_static_apids: "
 		    "ib_physpath_to_devlink failed\n");
--- a/usr/src/lib/cfgadm_plugins/sata/common/cfga_sata.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/lib/cfgadm_plugins/sata/common/cfga_sata.c	Sun Jul 08 03:19:56 2012 +0100
@@ -1695,7 +1695,7 @@
 
 	} else {
 		/* This is an empty port */
-		if (get_port_num(ap_id, &port) != SATA_CFGA_OK) {
+		if (get_port_num(ap_id, &port) != CFGA_SATA_OK) {
 			goto bailout;
 		}
 
--- a/usr/src/lib/krb5/plugins/preauth/pkinit/pkinit_srv.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/lib/krb5/plugins/preauth/pkinit/pkinit_srv.c	Sun Jul 08 03:19:56 2012 +0100
@@ -789,8 +789,9 @@
     }
 
     /* if this DH, then process finish computing DH key */
-    if (rep != NULL && (rep->choice == choice_pa_pk_as_rep_dhInfo ||
-	    rep->choice == choice_pa_pk_as_rep_draft9_dhSignedData)) {
+    if (((rep != NULL) && (rep->choice == choice_pa_pk_as_rep_dhInfo)) ||
+	((rep9 != NULL) && rep9->choice ==
+	    choice_pa_pk_as_rep_draft9_dhSignedData)) {
 	pkiDebug("received DH key delivery AS REQ\n");
 	retval = server_process_dh(context, plgctx->cryptoctx,
 	    reqctx->cryptoctx, plgctx->idctx, subjectPublicKey,
--- a/usr/src/lib/libsun_ima/common/ima.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/lib/libsun_ima/common/ima.c	Sun Jul 08 03:19:56 2012 +0100
@@ -2714,7 +2714,7 @@
 	}
 
 	i = 0;
-	if (auth.a_auth_method == IMA_AUTHMETHOD_NONE) {
+	if (auth.a_auth_method == authMethodNone) {
 		pMethodList[i++] = IMA_AUTHMETHOD_NONE;
 	} else if (auth.a_auth_method & authMethodCHAP) {
 		pMethodList[i++] = IMA_AUTHMETHOD_CHAP;
--- a/usr/src/lib/lvm/libmeta/common/meta_smf.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/lib/lvm/libmeta/common/meta_smf.c	Sun Jul 08 03:19:56 2012 +0100
@@ -23,8 +23,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * Service Management Facility (SMF) interfaces.
  */
@@ -184,7 +182,7 @@
 
 			if ((sp = metasetnosetname(i, ep)) == NULL) {
 				if (!mdisok(ep) && !mdiserror(ep, MDE_NO_SET) &&
-				    !mdismddberror(ep, MDE_NOTENOUGH_DB) &&
+				    !mdiserror(ep, MDE_NOTENOUGH_DB) &&
 				    !mdiserror(ep, MDE_SMF_NO_SERVICE) &&
 				    ep->info.errclass != MDEC_RPC) {
 					/*
@@ -257,7 +255,7 @@
 	int			rval = 0;
 
 	prop = scf_simple_prop_get(NULL, svc_name, SCF_PG_GENERAL,
-		SCF_PROPERTY_ENABLED);
+	    SCF_PROPERTY_ENABLED);
 
 	if (scf_simple_prop_numvalues(prop) == 1) {
 		if (*scf_simple_prop_next_boolean(prop) != 0)
--- a/usr/src/lib/lvm/libmeta/common/meta_trans.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/lib/lvm/libmeta/common/meta_trans.c	Sun Jul 08 03:19:56 2012 +0100
@@ -23,8 +23,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * Just in case we're not in a build environment, make sure that
  * TEXT_DOMAIN gets set to something.
@@ -55,10 +53,8 @@
     mdname_t *newnp, mdcmdopts_t options, md_error_t *ep)
 {
 	replace_params_t	params;
-	md_dev64_t		old_dev,
-				new_dev;
-	daddr_t			new_start_blk,
-				new_end_blk;
+	md_dev64_t		old_dev, new_dev;
+	daddr_t			new_start_blk, new_end_blk;
 
 	/* should have same set */
 	assert(sp != NULL);
@@ -657,7 +653,7 @@
 		is_mounted = (meta_check_inuse(sp,
 		    p->namep, MDCHK_MOUNTED, ep) != 0);
 
-		if (!mdisok(ep) && mdiserror(ep, MDE_IS_MOUNTED)) {
+		if (!mdisok(ep) && mdisuseerror(ep, MDE_IS_MOUNTED)) {
 			goto out;
 		}
 
@@ -714,7 +710,7 @@
 		is_mounted = (meta_check_inuse(sp,
 		    p->namep, MDCHK_MOUNTED, ep) != 0);
 
-		if (!mdisok(ep) && mdiserror(ep, MDE_IS_MOUNTED)) {
+		if (!mdisok(ep) && mdisuseerror(ep, MDE_IS_MOUNTED)) {
 			goto out;
 		}
 
@@ -771,13 +767,13 @@
 	}
 
 	len = strlen(umnt_msg) + strlen(fsck_msg) + strlen(mnt_msg) +
-							(only_fsck? 1: 0) + 1;
+	    (only_fsck? 1: 0) + 1;
 	if (!(rmsg = Zalloc(len))) {
 		len = 0;
 		goto out;
 	}
 	rc = snprintf(rmsg, len, "%s%s%s%s", umnt_msg, fsck_msg,
-					    !only_fsck? "\n": "", mnt_msg);
+	    !only_fsck? "\n": "", mnt_msg);
 	if (rc == EOF) {
 		goto out;
 	}
@@ -982,22 +978,22 @@
 		    dgettext(TEXT_DOMAIN, "Master Device"),
 		    dgettext(TEXT_DOMAIN, "Start Block"),
 		    dgettext(TEXT_DOMAIN, "Dbase"),
-			dgettext(TEXT_DOMAIN, "Reloc")) == EOF) {
+		    dgettext(TEXT_DOMAIN, "Reloc")) == EOF) {
 			goto out;
 		}
 
 		/* populate the key in the name_p structure */
 		if ((didnp = metadevname(&sp,
-				transp->masternamep->dev, ep)) == NULL) {
+		    transp->masternamep->dev, ep)) == NULL) {
 			return (-1);
 		}
 
 	    /* determine if devid does NOT exist */
 		if (options & PRINT_DEVID)
-		    if ((dtp = meta_getdidbykey(sp->setno, getmyside(sp, ep),
-					didnp->key, ep)) == NULL)
+			if ((dtp = meta_getdidbykey(sp->setno,
+			    getmyside(sp, ep), didnp->key, ep)) == NULL) {
 				devid = dgettext(TEXT_DOMAIN, "No ");
-			else {
+			} else {
 				devid = dgettext(TEXT_DOMAIN, "Yes");
 				free(dtp);
 			}
@@ -1338,7 +1334,7 @@
 		    dgettext(TEXT_DOMAIN, "Logging Device"),
 		    dgettext(TEXT_DOMAIN, "Start Block"),
 		    dgettext(TEXT_DOMAIN, "Dbase"),
-			dgettext(TEXT_DOMAIN, "Reloc")) == EOF) {
+		    dgettext(TEXT_DOMAIN, "Reloc")) == EOF) {
 			goto out;
 		}
 		/* get info */
@@ -1361,10 +1357,10 @@
 
 	    /* determine if devid does NOT exist */
 		if (options & PRINT_DEVID)
-		    if ((dtp = meta_getdidbykey(sp->setno, getmyside(sp, ep),
-					didnp->key, ep)) == NULL)
+			if ((dtp = meta_getdidbykey(sp->setno,
+			    getmyside(sp, ep), didnp->key, ep)) == NULL) {
 				devid = dgettext(TEXT_DOMAIN, "No ");
-			else {
+			} else {
 				devid = dgettext(TEXT_DOMAIN, "Yes");
 				free(dtp);
 			}
@@ -1504,7 +1500,7 @@
 	(void) fclose(m);
 
 	switch (pid = fork()) {
-	    case -1:
+	case -1:
 		/*
 		 * We've got some major trouble here and shouldn't
 		 * continue. The user needs to clear up the problems
@@ -1515,7 +1511,7 @@
 		*cookie = 0;
 		return (1);
 
-	    case 0:
+	case 0:
 		(void) execl("/usr/sbin/lockfs", "lockfs", lockit ? "-w" : "-u",
 		    "-c", "Solaris Volume Manager detach lock",
 		    tab_match.mnt_mountp, 0);
@@ -1527,7 +1523,7 @@
 		 */
 		exit(1);
 
-	    default:
+	default:
 		if (waitpid(pid, &lock_exit, 0) != pid) {
 			/*
 			 * We couldn't get status regarding the
--- a/usr/src/uts/common/fs/nfs/nfs3_xdr.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/uts/common/fs/nfs/nfs3_xdr.c	Sun Jul 08 03:19:56 2012 +0100
@@ -591,7 +591,8 @@
 		 * Common case
 		 */
 		vap->va_type = IXDR_GET_ENUM(ptr, enum vtype);
-		if (vap->va_type < NF3REG || vap->va_type > NF3FIFO)
+		if ((ftype3)vap->va_type < NF3REG ||
+		    (ftype3)vap->va_type > NF3FIFO)
 			vap->va_type = VBAD;
 		else
 			vap->va_type = nf3_to_vt[vap->va_type];
@@ -745,7 +746,8 @@
 		/*
 		 * Fixup as needed
 		 */
-		if (vap->va_type < NF3REG || vap->va_type > NF3FIFO)
+		if ((ftype3)vap->va_type < NF3REG ||
+		    (ftype3)vap->va_type > NF3FIFO)
 			vap->va_type = VBAD;
 		else
 			vap->va_type = nf3_to_vt[vap->va_type];
--- a/usr/src/uts/common/fs/nfs/nfs4_xdr.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/uts/common/fs/nfs/nfs4_xdr.c	Sun Jul 08 03:19:56 2012 +0100
@@ -903,8 +903,8 @@
 			if (!XDR_GETINT32(xdrs, (int *)&vap->va_type))
 				return (FALSE);
 
-			if (vap->va_type < NF4REG ||
-			    vap->va_type > NF4NAMEDATTR)
+			if ((nfs_ftype4)vap->va_type < NF4REG ||
+			    (nfs_ftype4)vap->va_type > NF4NAMEDATTR)
 				vap->va_type = VBAD;
 			else
 				vap->va_type = nf4_to_vt[vap->va_type];
@@ -1573,8 +1573,8 @@
 		if (resbmap & FATTR4_TYPE_MASK) {
 			vap->va_type = IXDR_GET_U_INT32(ptr);
 
-			if (vap->va_type < NF4REG ||
-			    vap->va_type > NF4NAMEDATTR)
+			if ((nfs_ftype4)vap->va_type < NF4REG ||
+			    (nfs_ftype4)vap->va_type > NF4NAMEDATTR)
 				vap->va_type = VBAD;
 			else
 				vap->va_type = nf4_to_vt[vap->va_type];
@@ -5043,7 +5043,7 @@
 		if (objp->array_len > objp->argsp->array_len)
 			return (FALSE);
 
-		if (objp->status == NFS_OK &&
+		if (objp->status == NFS4_OK &&
 		    objp->array_len != objp->argsp->array_len)
 			return (FALSE);
 
--- a/usr/src/uts/common/fs/nfs/nfs_server.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/uts/common/fs/nfs/nfs_server.c	Sun Jul 08 03:19:56 2012 +0100
@@ -1452,11 +1452,11 @@
 
 	if (req->rq_vers == NFS_VERSION && req->rq_proc == RFS_LOOKUP) {
 		struct nfsdiropres *dr = (struct nfsdiropres *)res;
-		if (dr->dr_status == WNFSERR_CLNT_FLAVOR)
+		if ((enum wnfsstat)dr->dr_status == WNFSERR_CLNT_FLAVOR)
 			return (TRUE);
 	} else if (req->rq_vers == NFS_V3 && req->rq_proc == NFSPROC3_LOOKUP) {
 		LOOKUP3res *resp = (LOOKUP3res *)res;
-		if (resp->status == WNFSERR_CLNT_FLAVOR)
+		if ((enum wnfsstat)resp->status == WNFSERR_CLNT_FLAVOR)
 			return (TRUE);
 	}
 	return (FALSE);
--- a/usr/src/uts/common/fs/sockfs/nl7chttp.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/uts/common/fs/sockfs/nl7chttp.c	Sun Jul 08 03:19:56 2012 +0100
@@ -155,7 +155,7 @@
 	clock_t		date;		/* Response Date: */
 	clock_t		expire;		/* Response Expire: */
 	clock_t		moddate;	/* Request *Modified-Since date */
-	act_t		modtokid;	/* Request *Modified-Since tokid */
+	enum tokid_e	modtokid;	/* Request *Modified-Since tokid */
 	time_t		lastmod;	/* Response Last-Modified: */
 	str_t		accept;		/* Request Accept: */
 	str_t		acceptchar;	/* Request Accept-Charset: */
--- a/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_ti.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_ti.c	Sun Jul 08 03:19:56 2012 +0100
@@ -890,7 +890,7 @@
 		 * In the case that open_channel() fails because of a
 		 * REJ or timeout, change retval to IBT_CM_FAILURE
 		 */
-		if (statep->open_return_data->rc_status != IBT_CM_ACCEPT) {
+		if (statep->open_return_data->rc_status != IBT_CM_SUCCESS) {
 			status = IBT_CM_FAILURE;
 			ibtl_cm_chan_open_is_aborted(channel);
 		}
--- a/usr/src/uts/common/io/scsi/targets/st.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/uts/common/io/scsi/targets/st.c	Sun Jul 08 03:19:56 2012 +0100
@@ -11572,11 +11572,11 @@
 	if (attrib->transfers_data != TRAN_NONE) {
 		if (count == 0) {
 			if (attrib->transfers_data == TRAN_WRTE) {
-				ASSERT(un->un_pos.pmode == ST_EOM);
+				ASSERT(un->un_pos.eof == ST_EOM);
 				nblks = 0;
 				nfiles = 0;
 			} else {
-				ASSERT(un->un_pos.pmode == ST_EOF_PENDING);
+				ASSERT(un->un_pos.eof == ST_EOF_PENDING);
 				nblks = 0;
 				nfiles = 1;
 			}
--- a/usr/src/uts/common/io/softmac/softmac_main.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/uts/common/io/softmac/softmac_main.c	Sun Jul 08 03:19:56 2012 +0100
@@ -143,7 +143,6 @@
 	ASSERT(softmac->smac_mh == NULL);
 	ASSERT(softmac->smac_softmac[0] == NULL &&
 	    softmac->smac_softmac[1] == NULL);
-	ASSERT(softmac->smac_state == SOFTMAC_INITIALIZED);
 	ASSERT(softmac->smac_lower == NULL);
 	ASSERT(softmac->smac_active == B_FALSE);
 	ASSERT(softmac->smac_nactive == 0);
--- a/usr/src/uts/common/sys/softmac_impl.h	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/uts/common/sys/softmac_impl.h	Sun Jul 08 03:19:56 2012 +0100
@@ -73,11 +73,6 @@
 } softmac_lower_t;
 
 typedef enum {
-	SOFTMAC_INITIALIZED,
-	SOFTMAC_READY
-} softmac_lower_state_t;
-
-typedef enum {
 	SOFTMAC_UNINIT,
 	SOFTMAC_ATTACH_INPROG,
 	SOFTMAC_ATTACH_DONE,
--- a/usr/src/uts/i86pc/io/pci/pci.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/uts/i86pc/io/pci/pci.c	Sun Jul 08 03:19:56 2012 +0100
@@ -545,6 +545,7 @@
 	int	totreg;
 	pci_state_t *pcip;
 	struct  attachspec *asp;
+	struct  detachspec *dsp;
 
 	switch (ctlop) {
 	case DDI_CTLOPS_REPORTDEV:
@@ -622,8 +623,8 @@
 		return (ddi_ctlops(dip, rdip, ctlop, arg, result));
 
 	case DDI_CTLOPS_DETACH:
-		asp = (struct attachspec *)arg;
-		if (asp->cmd == DDI_SUSPEND && asp->when == DDI_POST)
+		dsp = (struct detachspec *)arg;
+		if (dsp->cmd == DDI_SUSPEND && dsp->when == DDI_POST)
 			if (pci_post_suspend(rdip) != DDI_SUCCESS)
 				return (DDI_FAILURE);
 		return (ddi_ctlops(dip, rdip, ctlop, arg, result));
--- a/usr/src/uts/intel/io/heci/heci_intr.c	Fri Aug 17 15:12:35 2012 -0400
+++ b/usr/src/uts/intel/io/heci/heci_intr.c	Sun Jul 08 03:19:56 2012 +0100
@@ -1123,7 +1123,7 @@
 				list_del(&priv_cb_pos->cb_list);
 				if ((HECI_WRITING == file_ext->writing_state) &&
 					(priv_cb_pos->major_file_operations ==
-						HECI_WRITING) &&
+						HECI_WRITE) &&
 					(file_ext != &dev->iamthif_file_ext)) {
 					DBG("HECI WRITE COMPLETE\n");
 					file_ext->writing_state =