--- old/usr/src/cmd/bnu/uuglist.c	Sun Jul 16 20:04:36 2017
+++ new/usr/src/cmd/bnu/uuglist.c	Sun Jul 16 20:04:36 2017
@@ -20,6 +20,7 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -28,8 +29,6 @@
 /*	  All Rights Reserved  	*/
 
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include	"uucp.h"
 
 #define MAXLENGTH 256
@@ -129,13 +128,12 @@
 	FILE *cfd;
 	char line[BUFSIZ];
 	char *carray[C_MAX];
-	int na;
 
 	cfd = fopen(GRADES, "r");
 
 	while (rdfulline(cfd, line, BUFSIZ) != 0) {
 
-		na = getargs(line, carray, C_MAX);
+		(void) getargs(line, carray, C_MAX);
 		insert(carray[0]);
 	}
 
--- old/usr/src/cmd/bnu/uustat.c	Sun Jul 16 20:04:36 2017
+++ new/usr/src/cmd/bnu/uustat.c	Sun Jul 16 20:04:36 2017
@@ -20,6 +20,7 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -27,7 +28,6 @@
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
 #include <time.h>
 #include "uucp.h"
 
@@ -1542,9 +1542,6 @@
 char *uplimit, *lolimit;
 {
 
-	char c;
-
-	c = *(uplimit+6);
 	friendlyptr->uhour[0] = *(uplimit+6);
 	friendlyptr->uhour[1] = *(uplimit+7);
 	friendlyptr->lhour[0] = *(lolimit+6);
--- old/usr/src/cmd/cmd-inet/usr.bin/talk/get_names.c	Sun Jul 16 20:04:37 2017
+++ new/usr/src/cmd/cmd-inet/usr.bin/talk/get_names.c	Sun Jul 16 20:04:37 2017
@@ -20,6 +20,7 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -37,8 +38,6 @@
  * contributors.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include "talk.h"
 #include "ctl.h"
 #include <locale.h>
@@ -65,7 +64,6 @@
 	char *my_name;
 	char *my_machine_name;
 	char *rem_machine_name;
-	char *my_tty;
 	char *rem_tty;
 	char *ptr;
 	int name_length;
@@ -102,8 +100,6 @@
 	(void) sysinfo(SI_HOSTNAME, hostname, name_length);
 	my_machine_name = hostname;
 
-	my_tty = strrchr(ttyname(0), '/') + 1;
-
 	/*
 	 * check for, and strip out, the machine name of the target
 	 */
--- old/usr/src/cmd/cmd-inet/usr.sbin/ipadm/ipadm.c	Sun Jul 16 20:04:37 2017
+++ new/usr/src/cmd/cmd-inet/usr.sbin/ipadm/ipadm.c	Sun Jul 16 20:04:37 2017
@@ -22,6 +22,7 @@
 /*
  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2017 Nexenta Systems, Inc.
+ * Copyright 2017 Gary Mills
  */
 
 #include <arpa/inet.h>
@@ -507,21 +508,17 @@
 	char			*propval = statep->sps_propval;
 	uint_t			proto = statep->sps_proto;
 	size_t			propsize = MAXPROPVALLEN;
-	char			*object;
 	ipadm_status_t		status;
 
 	if (statep->sps_ifprop) {
 		status = ipadm_get_ifprop(iph, ifname, prop_name, propval,
 		    &propsize, proto, flags);
-		object = ifname;
 	} else if (statep->sps_modprop) {
 		status = ipadm_get_prop(iph, prop_name, propval, &propsize,
 		    proto, flags);
-		object = ipadm_proto2str(proto);
 	} else {
 		status = ipadm_get_addrprop(iph, prop_name, propval, &propsize,
 		    statep->sps_aobjname, flags);
-		object = statep->sps_aobjname;
 	}
 
 	if (status != IPADM_SUCCESS) {
--- old/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_dhcpv6.c	Sun Jul 16 20:04:37 2017
+++ new/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_dhcpv6.c	Sun Jul 16 20:04:37 2017
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -584,7 +585,7 @@
 show_options(const uint8_t *data, int len)
 {
 	dhcpv6_option_t d6o;
-	uint_t olen, retlen;
+	uint_t olen;
 	uint16_t val16;
 	uint16_t type;
 	uint32_t val32;
@@ -766,7 +767,7 @@
 			if (olen > 0) {
 				oldnest = prot_nest_prefix;
 				prot_nest_prefix = prot_prefix;
-				retlen = interpret_dhcpv6(F_DTAIL, data, olen);
+				(void) interpret_dhcpv6(F_DTAIL, data, olen);
 				prot_prefix = prot_nest_prefix;
 				prot_nest_prefix = oldnest;
 			}
--- old/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_rpcsec.c	Sun Jul 16 20:04:37 2017
+++ new/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_rpcsec.c	Sun Jul 16 20:04:37 2017
@@ -23,6 +23,7 @@
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  * Copyright 2012 Milan Jurik. All rights reserved.
+ * Copyright 2017 Gary Mills
  */
 
 #include <sys/types.h>
@@ -293,15 +294,13 @@
 void
 extract_rpcsec_gss_cred_info(int xid)
 {
-	unsigned int seq_num;
 	unsigned int handle_len;
-	unsigned int flavor_len;
 	unsigned int rpcsec_gss_ver;
 	rpc_gss_service_t rpcsec_gss_service;
 	unsigned int rpcsec_gss_proc;
 	struct cache_struct *x;
 
-	flavor_len = getxdr_u_long();
+	(void) getxdr_u_long();
 	rpcsec_gss_ver = getxdr_u_long();
 	/* see if we know this version or not */
 	if (rpcsec_gss_ver != 1) {
@@ -308,7 +307,7 @@
 		longjmp(xdr_err, 1);
 	}
 	rpcsec_gss_proc   = getxdr_u_long();
-	seq_num    = getxdr_u_long();
+	(void) getxdr_u_long();
 	rpcsec_gss_service    = getxdr_enum();
 	/* skip the handle */
 	xdr_skip(RNDUP(getxdr_u_long()));
@@ -327,7 +326,7 @@
 print_rpc_gss_init_arg(int flags, struct cache_struct *x)
 {
 
-	char *token, *line;
+	char  *line;
 	unsigned int token_len;
 	int pos = 0;
 
@@ -348,7 +347,7 @@
 
 	pos = getxdr_pos();
 	token_len = getxdr_u_long();
-	token = getxdr_hex(token_len);
+	(void) getxdr_hex(token_len);
 	line = get_line(pos, getxdr_pos());
 	sprintf(line, "   gss token: length = %d, data = [%d bytes]",
 	    token_len, token_len);
@@ -363,7 +362,7 @@
 print_rpc_gss_init_res(int flags)
 {
 
-	char *handle, *token, *line;
+	char *handle, *line;
 	unsigned int token_len, handle_len;
 	unsigned int major, minor, seq_window;
 
@@ -395,7 +394,7 @@
 	    "   sequence window  = %u", seq_window);
 	pos = getxdr_pos();
 	token_len = getxdr_u_long();
-	token = getxdr_hex(token_len);
+	(void) getxdr_hex(token_len);
 	line = get_line(pos, getxdr_pos());
 	sprintf(line, "   gss token: length = %d, data = [%d bytes]",
 	    token_len, token_len);
--- old/usr/src/cmd/gss/gssd/gssdtest.c	Sun Jul 16 20:04:37 2017
+++ new/usr/src/cmd/gss/gssd/gssdtest.c	Sun Jul 16 20:04:37 2017
@@ -20,6 +20,7 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -1294,9 +1295,7 @@
 	OM_UINT32 status;
 	gss_ctx_id_t *context_handle;
 	OM_uint32 minor_status;
-	uid_t uid;
 
-	uid = (uid_t) getuid();
 
 	/* parse the command line to determine the variable input argument */
 
--- old/usr/src/cmd/hal/addons/network-devices/common.c	Sun Jul 16 20:04:38 2017
+++ new/usr/src/cmd/hal/addons/network-devices/common.c	Sun Jul 16 20:04:38 2017
@@ -1,4 +1,5 @@
 /*
+ * Copyright 2017 Gary Mills
  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  *
  * Licensed under the Academic Free License version 2.1
@@ -113,7 +114,7 @@
 static char *
 pseudo_serialno_from_addr(char *name)
 {
-	int sd, rc, errnum;
+	int sd, errnum;
 	char buf[128];
 	struct hostent *hp;
 	struct xarpreq ar;
@@ -140,7 +141,7 @@
 	sd = socket(AF_INET, SOCK_DGRAM, 0);
 
 	ar.xarp_ha.sdl_family = AF_LINK;
-	rc = ioctl(sd, SIOCGXARP, (caddr_t)&ar);
+	(void) ioctl(sd, SIOCGXARP, (caddr_t)&ar);
 
 	close(sd);
 
--- old/usr/src/cmd/hal/addons/storage/addon-storage.c	Sun Jul 16 20:04:38 2017
+++ new/usr/src/cmd/hal/addons/storage/addon-storage.c	Sun Jul 16 20:04:38 2017
@@ -2,6 +2,7 @@
  *
  * addon-storage.c : watch removable media state changes
  *
+ * Copyright 2017 Gary Mills
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -318,8 +319,6 @@
 	char *bus;
 	char *drive_type;
 	int state, last_state;
-	char *support_media_changed_str;
-	int support_media_changed;
 	int fd = -1;
 
 	if ((udi = getenv ("UDI")) == NULL)
@@ -341,12 +340,6 @@
 
 	sysevent_init ();
 
-	support_media_changed_str = getenv ("HAL_PROP_STORAGE_CDROM_SUPPORT_MEDIA_CHANGED");
-	if (support_media_changed_str != NULL && strcmp (support_media_changed_str, "true") == 0)
-		support_media_changed = TRUE;
-	else
-		support_media_changed = FALSE;
-
 	dbus_error_init (&error);
 
 	if ((ctx = libhal_ctx_init_direct (&error)) == NULL) {
--- old/usr/src/cmd/ipf/tools/ipfcomp.c	Sun Jul 16 20:04:38 2017
+++ new/usr/src/cmd/ipf/tools/ipfcomp.c	Sun Jul 16 20:04:38 2017
@@ -5,10 +5,9 @@
  *
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ * Copyright 2017 Gary Mills
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #if !defined(lint)
 static const char sccsid[] = "@(#)ip_fil.c	2.41 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)$Id: ipfcomp.c,v 1.24.2.2 2004/04/28 10:34:44 darrenr Exp $";
@@ -69,7 +68,6 @@
 void printc(fr)
 frentry_t *fr;
 {
-	fripf_t *ipf;
 	u_long *ulp;
 	char *and;
 	FILE *fp;
@@ -82,7 +80,6 @@
 	if ((fr->fr_type == FR_T_IPF) &&
 	    ((fr->fr_datype != FRI_NORMAL) || (fr->fr_satype != FRI_NORMAL)))
 		return;
-	ipf = fr->fr_ipf;
 
 	if (cfile == NULL)
 		cfile = fopen("ip_rules.c", "w");
--- old/usr/src/cmd/ipf/tools/ippool.c	Sun Jul 16 20:04:38 2017
+++ new/usr/src/cmd/ipf/tools/ippool.c	Sun Jul 16 20:04:38 2017
@@ -7,6 +7,7 @@
  * Use is subject to license terms.
  *
  * Copyright (c) 2014, Joyent, Inc.  All rights reserved.
+ * Copyright 2017 Gary Mills
  */
 
 #include <sys/types.h>
@@ -382,8 +383,9 @@
 {
 	char *kernel, *core, *poolname;
 	int c, role, type, live_kernel;
-	ip_pool_stat_t *plstp, plstat;
-	iphtstat_t *htstp, htstat;
+	ip_pool_stat_t *plstp;
+	ip_pool_stat_t  plstat;
+	iphtstat_t  htstat;
 	iphtable_t *hptr;
 	iplookupop_t op;
 	ip_pool_t *ptr;
@@ -469,7 +471,6 @@
 	}
 
 	if (type == IPLT_ALL || type == IPLT_POOL) {
-		plstp = &plstat;
 		op.iplo_type = IPLT_POOL;
 		op.iplo_size = sizeof(plstat);
 		op.iplo_struct = &plstat;
@@ -503,7 +504,6 @@
 		}
 	}
 	if (type == IPLT_ALL || type == IPLT_HASH) {
-		htstp = &htstat;
 		op.iplo_type = IPLT_HASH;
 		op.iplo_size = sizeof(htstat);
 		op.iplo_struct = &htstat;
@@ -642,15 +642,11 @@
 int argc;
 char *argv[];
 {
-	int c, type, role, live_kernel;
+	int c, type, role;
 	ip_pool_stat_t plstat;
-	char *kernel, *core;
 	iphtstat_t htstat;
 	iplookupop_t op;
 
-	core = NULL;
-	kernel = NULL;
-	live_kernel = 1;
 	type = IPLT_ALL;
 	role = IPL_LOGALL;
 
@@ -666,12 +662,8 @@
 			setzonename_global(optarg);
 			break;
 		case 'M' :
-			live_kernel = 0;
-			core = optarg;
 			break;
 		case 'N' :
-			live_kernel = 0;
-			kernel = optarg;
 			break;
 		case 'o' :
 			role = getrole(optarg);
--- old/usr/src/cmd/krb5/ldap_util/kdb5_ldap_list.c	Sun Jul 16 20:04:38 2017
+++ new/usr/src/cmd/krb5/ldap_util/kdb5_ldap_list.c	Sun Jul 16 20:04:38 2017
@@ -1,5 +1,3 @@
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * kadmin/ldap_util/kdb5_ldap_list.c
  */
@@ -164,7 +162,6 @@
     char **dlist = NULL, **tmplist = NULL;
     const char **slist = NULL;
     int dcount = 0, scount = 0, copycount = 0;
-    int found = 0;
 
     if ((destlist == NULL) || (*destlist == NULL) || (sourcelist == NULL))
 	return;
@@ -200,10 +197,8 @@
 	 * from the destination list */
 	for (slist = sourcelist; *slist != NULL; slist++) {
 	    for (dlist = *destlist; *dlist != NULL; dlist++) {
-		found = 0; /* value not found */
 		/* DN is case insensitive string */
 		if (strcasecmp(*dlist, *slist) == 0) {
-		    found = 1;
 		    free(*dlist);
 		    /* Advance the rest of the entries by one */
 		    for (tmplist = dlist; *tmplist != NULL; tmplist++) {
--- old/usr/src/cmd/krb5/ldap_util/kdb5_ldap_realm.c	Sun Jul 16 20:04:38 2017
+++ new/usr/src/cmd/krb5/ldap_util/kdb5_ldap_realm.c	Sun Jul 16 20:04:38 2017
@@ -1,4 +1,5 @@
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -156,9 +157,7 @@
     time_t now;
     int mask = 0;
     krb5_error_code retval = 0;
-    krb5_boolean no_msg = FALSE;
 
-    krb5_boolean print_usage = FALSE;
     /* Solaris Kerberos */
     char *me = progname;
 
@@ -302,10 +301,8 @@
 	mask |=LDAP_REALM_KRBTICKETFLAGS;
     }
 err_usage:
-    print_usage = TRUE;
 
 err_nomsg:
-    no_msg = TRUE;
 
     return mask;
 }
--- old/usr/src/cmd/ldap/common/fileurl.c	Sun Jul 16 20:04:39 2017
+++ new/usr/src/cmd/ldap/common/fileurl.c	Sun Jul 16 20:04:39 2017
@@ -1,4 +1,5 @@
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -360,7 +361,6 @@
 {
     FILE	*fp;
     long	rlen;
-    int		eof;
 #if defined( XP_WIN32 )
     char	mode[20] = "r+b";
 #else
@@ -397,7 +397,6 @@
     }
 
     rlen = fread( bvp->bv_val, 1, bvp->bv_len, fp );
-    eof = feof( fp );
     fclose( fp );
 
     if ( rlen != (long)bvp->bv_len ) {
--- old/usr/src/cmd/lp/lib/papi/ppd.c	Sun Jul 16 20:04:39 2017
+++ new/usr/src/cmd/lp/lib/papi/ppd.c	Sun Jul 16 20:04:39 2017
@@ -19,12 +19,11 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * This file contains an extremely rudimentary implementation of PPD file
  * parsing support.  The parsing done here converts the contents of a PPD
@@ -90,7 +89,6 @@
 	char capability[256];
 	char def[256];
 	char supported[256];
-	char *current_group_name = NULL;
 
 	int ui = 0;
 
@@ -120,7 +118,6 @@
 		if (strcasecmp(key, "OpenGroup") == 0) {
 			if (value == NULL)
 				value = "unknown";
-			current_group_name = strdup(value);
 		} else if (strcasecmp(key, "OpenUI") == 0) {
 			if ((strcasecmp(value, "PageSize") == 0) ||
 			    (strcasecmp(value, "InputSlot") == 0))
--- old/usr/src/cmd/mail/copylet.c	Sun Jul 16 20:04:39 2017
+++ new/usr/src/cmd/mail/copylet.c	Sun Jul 16 20:04:39 2017
@@ -20,6 +20,7 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -27,8 +28,6 @@
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include "mail.h"
 
 /*
@@ -90,7 +89,6 @@
 					/* H_RECEIVED lines? */
 	long	clen = -1L;
 	int	htype;			/* header type */
-	int	sav_htype;	/* Header type of last non-H_CONT header line */
 	struct hdrs *hptr;
 
 	if (!sending) {
@@ -296,7 +294,6 @@
 			sav_suppress = suppress;
 			suppress = FALSE;
 			print_from_struct = FALSE;
-			sav_htype = htype;
 			htype = isheader (buf, &ctf);
 			Dout(pn, 5, "loop 2: buf = %s, htype= %d/%s\n", buf, htype, header[htype].tag);
 			/* The following order is defined in the MTA documents. */
--- old/usr/src/cmd/print/bsd-sysv-commands/disable.c	Sun Jul 16 20:04:39 2017
+++ new/usr/src/cmd/print/bsd-sysv-commands/disable.c	Sun Jul 16 20:04:39 2017
@@ -21,6 +21,7 @@
  */
 
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -92,7 +93,6 @@
 	papi_encryption_t encryption = PAPI_ENCRYPT_NEVER;
 	int exit_status = 0;
 	int cancel = 0;
-	int pending = 0;	/* not implemented */
 	char *reason = NULL;
 	int c;
 
@@ -105,7 +105,6 @@
 			cancel = 1;
 			break;
 		case 'W':	/* wait for active request, not implemented */
-			pending = 1;
 			break;
 		case 'r':	/* reason */
 			reason = optarg;
--- old/usr/src/cmd/print/bsd-sysv-commands/lpr.c	Sun Jul 16 20:04:39 2017
+++ new/usr/src/cmd/print/bsd-sysv-commands/lpr.c	Sun Jul 16 20:04:39 2017
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -27,8 +28,6 @@
 
 /* $Id: lpr.c 146 2006-03-24 00:26:54Z njacobs $ */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -75,7 +74,6 @@
 	papi_encryption_t encryption = PAPI_ENCRYPT_NEVER;
 	int dump = 0;
 	int validate = 0;
-	int remove = 0;
 	int copy = 1;	/* default is to copy the data */
 	char *document_format = "text/plain";
 	int c;
@@ -170,7 +168,6 @@
 				"rfc-1179-mail", 1);
 			break;
 		case 'r':
-			remove = 1;
 			break;
 		case 's':
 			copy = 0;
--- old/usr/src/cmd/refer/glue4.c	Sun Jul 16 20:04:39 2017
+++ new/usr/src/cmd/refer/glue4.c	Sun Jul 16 20:04:39 2017
@@ -1,4 +1,5 @@
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -12,9 +13,7 @@
  * specifies the terms and conditions for redistribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
 
-
 #include <stdio.h>
 #include <ctype.h>
 
@@ -26,7 +25,7 @@
 	char line[200], *s, argig[100], *cv[50];
 	char *inp, inb[500];
 	FILE *qf, *gf;
-	int c, oldc = 0, alph = 0, nv = 0;
+	int c, alph = 0, nv = 0;
 	int sv0, sv1;
 	strcpy(argig, arg);
 	strcat(argig, ".ig");
@@ -47,7 +46,6 @@
 			cv[nv++] = inp;
 		if (alph > 6)
 			*inp = 0;
-		oldc = c;
 	}
 #if D1
 	fprintf(stderr, "%d args set up\n", nv);
--- old/usr/src/cmd/refer/hunt7.c	Sun Jul 16 20:04:39 2017
+++ new/usr/src/cmd/refer/hunt7.c	Sun Jul 16 20:04:39 2017
@@ -1,4 +1,5 @@
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -12,8 +13,6 @@
  * specifies the terms and conditions for redistribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <stdio.h>
 #include <locale.h>
 #include <assert.h>
@@ -37,7 +36,7 @@
 	extern long gdate();
 	static FILE *fa = NULL;
 	long lp, llen;
-	int len, k, nofil;
+	int k, nofil;
 
 #if D1
 	fprintf(stderr, "findline: %s\n", in);
@@ -116,7 +115,7 @@
 		if (*out == NULL) {
 			return (0);
 		}
-		len = fread(*out, 1, llen, fa);
+		(void) fread(*out, 1, llen, fa);
 		*(*out + llen) = 0;
 #ifdef D1
 		fprintf(stderr, "length as read is %d\n", len);
--- old/usr/src/cmd/sh/xec.c	Sun Jul 16 20:04:40 2017
+++ new/usr/src/cmd/sh/xec.c	Sun Jul 16 20:04:40 2017
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -124,7 +125,7 @@
 
 		case TCOM:
 			{
-				unsigned char	*a1, *name;
+				unsigned char	*name;
 				int	argn, internal;
 				struct argnod	*schain = gchain;
 				struct ionod	*io = t->treio;
@@ -136,7 +137,6 @@
 				gchain = 0;
 				argn = getarg(t);
 				com = scan(argn);
-				a1 = com[1];
 				gchain = schain;
 
 				if (argn != 0)
--- old/usr/src/cmd/svr4pkg/pkgremove/special.c	Sun Jul 16 20:04:40 2017
+++ new/usr/src/cmd/svr4pkg/pkgremove/special.c	Sun Jul 16 20:04:40 2017
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -499,7 +500,7 @@
 {
 	int result = 0;		/* Assume we will succeed.  Return result. */
 	char **ppcSC = NULL;	/* The special contents rules, sorted. */
-	int i, j;		/* Indexes into contents & special contents */
+	int i;			/* Index into contents & special contents */
 	FILE *fpi = NULL,	/* Input of contents file */
 	    *fpo = NULL;	/* Output to temp contents file */
 	char cpath[PATH_MAX],	/* Contents file path */
@@ -599,7 +600,7 @@
 	 */
 	(void) memset(line, 0, LINESZ);
 
-	for (i = 0, j = 0; fgets(line, LINESZ, fpi) != NULL; ) {
+	for (i = 0; fgets(line, LINESZ, fpi) != NULL; ) {
 
 		char *pcpath = NULL;
 
--- old/usr/src/cmd/troff/nroff.d/n6.c	Sun Jul 16 20:04:40 2017
+++ new/usr/src/cmd/troff/nroff.d/n6.c	Sun Jul 16 20:04:40 2017
@@ -20,6 +20,7 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -201,11 +202,10 @@
 
 tchar setht()		/* set character height from \H'...' */
 {
-	int	n;
 	tchar c;
 
 	getch();
-	n = inumb(&apts);
+	(void) inumb(&apts);
 	getch();
 	return(0);
 }
--- old/usr/src/cmd/volcheck/volcheck.c	Sun Jul 16 20:04:40 2017
+++ new/usr/src/cmd/volcheck/volcheck.c	Sun Jul 16 20:04:40 2017
@@ -19,6 +19,7 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -54,9 +55,6 @@
 {
 	const char	*opts = "itv";
 	int		c;
-	boolean_t	opt_i = B_FALSE;
-	boolean_t	opt_t = B_FALSE;
-	boolean_t	opt_v = B_FALSE;
 	LibHalContext	*hal_ctx;
 	DBusError	error;
 	rmm_error_t	rmm_error;
@@ -67,13 +65,10 @@
 	while ((c = getopt(argc, argv, opts)) != EOF) {
 		switch (c) {
 		case 'i':
-			opt_i = B_TRUE;
 			break;
 		case 't':
-			opt_t = B_TRUE;
 			break;
 		case 'v':
-			opt_v = B_TRUE;
 			break;
 		default:
 			usage();
--- old/usr/src/cmd/ypcmd/ypserv.c	Sun Jul 16 20:04:40 2017
+++ new/usr/src/cmd/ypcmd/ypserv.c	Sun Jul 16 20:04:40 2017
@@ -20,6 +20,7 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -32,8 +33,6 @@
  * under license from the Regents of the University of California.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * This contains the mainline code for the YP server.  Data
  * structures which are process-global are also in this module.
@@ -174,7 +173,7 @@
 ypinit(int argc, char **argv)
 {
 	int pid;
-	int stat, t;
+	int stat;
 	struct sigaction act;
 	int ufd, tfd;
 	SVCXPRT *utransp, *ttransp;
@@ -237,7 +236,7 @@
 		    freopen(logfile, "a", stderr);
 		}
 
-		t = open("/dev/tty", 2);
+		(void) open("/dev/tty", 2);
 
 		setpgrp();
 	}
