diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-11-17 12:58:33 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-11-17 12:58:33 +0000 |
commit | 3de4744b1b965ad188cb7a92a2461427367e9a12 (patch) | |
tree | 16909b7535bddbdf1ed15f4bbd403a7e2f9e11e5 /usr/src | |
parent | 802a31260b1873751a82dd69cc509e3082d868c0 (diff) | |
parent | b14715fcd76b149c1fa0e1137cd516631ca5f295 (diff) | |
download | illumos-joyent-3de4744b1b965ad188cb7a92a2461427367e9a12.tar.gz |
[illumos-gate merge]
commit b14715fcd76b149c1fa0e1137cd516631ca5f295
8699 Want NIC transceiver visibility (fix lint)
commit 9d218268650a3767f3df2612043a730a935ea2a9
8804 nvme: add alias for pciclass,010802
commit 5b5fb15366257580ddfa65c652a1da8e0c6d4fd5
8795 loader: add efi_devpath_is_prefix()
commit 7373b68a8a0aaee382a6403d5a70fce9bd19d62a
8786 s1394: variable 'type' set but not used
commit c340f0f5876f4c5f9f4768c5b3f112e89b611888
8785 p4_pcbe: 'p4_cccrstop' defined but not used
commit 4f62a6570dcd50f97b2c01e95cbb683b3f9d7a7c
8783 pppd: 'rcsid' defined but not used
commit 3078e445fa2468f969d4f787db6f303739fdf820
8782 chat: 'rcsid' defined but not used
commit f4d6818a2f6bb2640f51b221780039982957a0ca
8781 pppstats: 'rcsid' defined but not used
commit ba448f1770618a414cb80eee258f018e711b407f
8780 gss_mechs: variable set but not used
commit 38f33a76fa7f74946118fef8a670ecc05f7675e1
8778 kadm5: variable 'tl_data_orig' set but not used
commit 495ee6847d0d3e288f47ba026d98a830e51cbc06
8777 krb5/plugins/kdb: variable set but not used
commit 0f1d26a485e4e2010058758dfd2d45d98e3482b0
8772 kadmin/server: variable 'maj_stat' set but not used
commit 6e573db1dd63b3b24579b7ceee32de57c994405c
8770 lofiadm: variable 'btMode' set but not used
commit 9c3b8506879f8963287c430f2eb2e74c554a1c54
8724 libc: multiple variable set but not used errors
commit 578f67364c19b20450a4783ebeae776c9e900185
8794 cstyle generates warnings with recent perl
commit fa4b26fb5b73dd0f0319a34c6046034202e60bc6
8793 libbsm build failure with recent perl
commit 5026b7fcee27ac1c884a99b607cc2abea07137d6
8775 krb5kdc: variable set but not used
commit dfe02591ce4c15a40d7babbf85ceb4125485779d
8769 mv: variable 'rc' set but not used
commit d9e525a856d3050197717c45fb58667e0ee0f297
8767 cmd/hal: variable set but not used
commit 0803869a9bc0aff1c81287ac6eae15943cbba545
8766 pcitool: typedef locally defined but not used
commit 62a14a75a4b2740af69a083f5ae385596db7ffc8
8763 sendmail: set but not used parameter/variable
Diffstat (limited to 'usr/src')
51 files changed, 144 insertions, 282 deletions
diff --git a/usr/src/boot/sys/boot/efi/include/efilib.h b/usr/src/boot/sys/boot/efi/include/efilib.h index e5eadf6a5d..180757c9e5 100644 --- a/usr/src/boot/sys/boot/efi/include/efilib.h +++ b/usr/src/boot/sys/boot/efi/include/efilib.h @@ -74,6 +74,7 @@ EFI_HANDLE efi_devpath_handle(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_devpath_last_node(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_devpath_trim(EFI_DEVICE_PATH *); bool efi_devpath_match(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); +bool efi_devpath_is_prefix(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *); void efi_free_devpath_name(CHAR16 *); diff --git a/usr/src/boot/sys/boot/efi/libefi/devpath.c b/usr/src/boot/sys/boot/efi/libefi/devpath.c index ab56d97a9a..86172ba093 100644 --- a/usr/src/boot/sys/boot/efi/libefi/devpath.c +++ b/usr/src/boot/sys/boot/efi/libefi/devpath.c @@ -141,7 +141,7 @@ efi_devpath_handle(EFI_DEVICE_PATH *devpath) bool efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) { - size_t len; + size_t len; if (devpath1 == NULL || devpath2 == NULL) return (false); @@ -165,3 +165,32 @@ efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) } return (true); } + +bool +efi_devpath_is_prefix(EFI_DEVICE_PATH *prefix, EFI_DEVICE_PATH *path) +{ + size_t len; + + if (prefix == NULL || path == NULL) + return (false); + + while (1) { + if (IsDevicePathEnd(prefix)) + break; + + if (DevicePathType(prefix) != DevicePathType(path) || + DevicePathSubType(prefix) != DevicePathSubType(path)) + return (false); + + len = DevicePathNodeLength(prefix); + if (len != DevicePathNodeLength(path)) + return (false); + + if (memcmp(prefix, path, len) != 0) + return (false); + + prefix = NextDevicePathNode(prefix); + path = NextDevicePathNode(path); + } + return (true); +} diff --git a/usr/src/cmd/cmd-inet/usr.bin/chat/chat.c b/usr/src/cmd/cmd-inet/usr.bin/chat/chat.c index 34730643b3..6954ed7a25 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/chat/chat.c +++ b/usr/src/cmd/cmd-inet/usr.bin/chat/chat.c @@ -90,12 +90,6 @@ #define const #endif -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef lint -static const char rcsid[] = "$Id: chat.c,v 1.26 1999/12/23 01:39:54 paulus Exp $"; -#endif - #include <stdio.h> #include <ctype.h> #include <time.h> diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/auth.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/auth.c index 9bf6587bde..37244d836f 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/auth.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/auth.c @@ -35,9 +35,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#define RCSID "$Id: auth.c,v 1.65 2000/04/15 01:27:10 masputra Exp $" - /* Pull in crypt() definition. */ #define __EXTENSIONS__ @@ -92,10 +89,6 @@ #endif #include "pathnames.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - /* Bits in scan_authfile return value */ #define NONWILD_SERVER 1 #define NONWILD_CLIENT 2 diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/cbcp.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/cbcp.c index ca5ebab975..4243f9096f 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/cbcp.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/cbcp.c @@ -21,9 +21,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#define RCSID "$Id: cbcp.c,v 1.10 1999/08/13 06:46:10 paulus Exp $" - #include <stdio.h> #include <string.h> #include <sys/types.h> @@ -34,10 +31,6 @@ #include "fsm.h" #include "lcp.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - /* * Options. */ diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/ccp.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/ccp.c index b3bc84b0e1..e58f9f1831 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/ccp.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/ccp.c @@ -31,9 +31,6 @@ * Copyright (c) 2016 by Delphix. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#define RCSID "$Id: ccp.c,v 1.30 2000/04/15 01:27:11 masputra Exp $" - #include <stdlib.h> #include <string.h> @@ -42,10 +39,6 @@ #include "ccp.h" #include <net/ppp-comp.h> -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - /* * Command-line options. */ diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/chap.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/chap.c index 707b9f7a71..95d8e18643 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/chap.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/chap.c @@ -36,12 +36,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define RCSID "$Id: chap.c,v 1.24 1999/11/15 01:51:50 paulus Exp $" - -/* - * TODO: - */ - #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -55,10 +49,6 @@ #include "chap_ms.h" #endif -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - /* * Command-line options. */ diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/chap_ms.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/chap_ms.c index 21cf5ee114..4b32195f14 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/chap_ms.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/chap_ms.c @@ -40,9 +40,6 @@ * Added MS-CHAPv2 support. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#define RCSID "$Id: chap_ms.c,v 1.15 1999/08/13 06:46:12 paulus Exp $" - #if defined(CHAPMS) || defined(CHAPMSV2) #include <stdio.h> @@ -69,10 +66,6 @@ #include "chap_ms.h" #include "md4.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - typedef struct { u_char LANManResp[24]; u_char NTResp[24]; diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/demand.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/demand.c index a5e04eb90b..7a73fecb4a 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/demand.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/demand.c @@ -20,8 +20,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define RCSID "$Id: demand.c,v 1.13 2000/04/15 01:27:11 masputra Exp $" - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -45,10 +43,6 @@ #include "fsm.h" #include "lcp.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - static char *frame; static int framelen; static int framemax; diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/fsm.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/fsm.c index a9ad47660d..cab1ae03a8 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/fsm.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/fsm.c @@ -20,9 +20,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#define RCSID "$Id: fsm.c,v 1.17 1999/08/13 06:46:12 paulus Exp $" - /* * TODO: * Randomize fsm id on link/init. @@ -39,10 +36,6 @@ #include "pppd.h" #include "fsm.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - static void fsm_timeout __P((void *)); static void fsm_rconfreq __P((fsm *, int, u_char *, int)); static void fsm_rconfack __P((fsm *, int, u_char *, int)); diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/ipcp.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/ipcp.c index 897df43160..8981db5c04 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/ipcp.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/ipcp.c @@ -23,12 +23,6 @@ * Copyright (c) 2016 by Delphix. All rights reserved. */ -#define RCSID "$Id: ipcp.c,v 1.54 2000/04/15 01:27:11 masputra Exp $" - -/* - * TODO: - */ - #include <stdio.h> #include <string.h> #include <netdb.h> @@ -47,10 +41,6 @@ #include "ipcp.h" #include "pathnames.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - /* global vars */ ipcp_options ipcp_wantoptions[NUM_PPP]; /* Options that we want to request */ ipcp_options ipcp_gotoptions[NUM_PPP]; /* Options that peer ack'd */ diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/ipv6cp.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/ipv6cp.c index 71651dbdba..96ac577071 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/ipv6cp.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/ipv6cp.c @@ -98,8 +98,6 @@ * $Id: ipv6cp.c,v 1.9 2000/04/15 01:27:11 masputra Exp $ */ -#define RCSID "$Id: ipv6cp.c,v 1.9 2000/04/15 01:27:11 masputra Exp $" - /* * TODO: * @@ -129,10 +127,6 @@ #include "magic.h" #include "pathnames.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - /* global vars */ ipv6cp_options ipv6cp_wantoptions[NUM_PPP]; /* Options that we want to request */ ipv6cp_options ipv6cp_gotoptions[NUM_PPP]; /* Options that peer ack'd */ diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/lcp.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/lcp.c index b4d653c06e..97cc8c1622 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/lcp.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/lcp.c @@ -22,12 +22,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define RCSID "$Id: lcp.c,v 1.54 2000/04/27 03:51:18 masputra Exp $" - -/* - * TODO: - */ - #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -51,10 +45,6 @@ #include "magic.h" #include "patchlevel.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - /* * Special failure codes for logging link failure reasons. */ diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/magic.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/magic.c index 09d5086dfe..0fa15f2073 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/magic.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/magic.c @@ -17,9 +17,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#define RCSID "$Id: magic.c,v 1.9 1999/08/13 06:46:15 paulus Exp $" - #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -29,10 +26,6 @@ #include "pppd.h" #include "magic.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - #ifdef NO_DRAND48 long mrand48 __P((void)); void srand48 __P((long)); diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/main.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/main.c index 4207ea1712..c3c99a7364 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/main.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/main.c @@ -34,8 +34,6 @@ * Copyright (c) 2016 by Delphix. All rights reserved. */ -#define RCSID "$Id: main.c,v 1.97 2000/04/24 02:54:16 masputra Exp $" - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -86,10 +84,6 @@ #include "atcp.h" #endif -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - /* interface vars */ char ifname[32]; /* Interface name */ int ifunit = -1; /* Interface unit number */ diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/mschap_test.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/mschap_test.c index 3202348a32..72b17d65e5 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/mschap_test.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/mschap_test.c @@ -17,8 +17,6 @@ #include "chap.h" #include "chap_ms.h" -#pragma ident "%Z%%M% %I% %E% SMI" - static void show_response(chap_state *cstate, const char *str) { diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/multilink.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/multilink.c index 518a2688aa..3383d582de 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/multilink.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/multilink.c @@ -17,9 +17,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#define RCSID "$Id: $" - #include <string.h> #include <ctype.h> #include <stdlib.h> @@ -35,9 +32,6 @@ #ifdef HAVE_MULTILINK #include "tdb.h" #endif -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif #define set_ip_epdisc(ep, addr) ( \ ep->length = 4, \ diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/options.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/options.c index f5952e51d8..f3b2ed55d9 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/options.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/options.c @@ -31,8 +31,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define RCSID "$Id: options.c,v 1.74 2000/04/15 01:27:13 masputra Exp $" - #include <ctype.h> #include <stdio.h> #include <errno.h> @@ -66,10 +64,6 @@ char *strdup __P((char *)); #endif -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - /* * Option variables and default values. */ diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/sys-solaris.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/sys-solaris.c index d728fef890..e7fcb8fae8 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/sys-solaris.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/sys-solaris.c @@ -39,8 +39,6 @@ * OR MODIFICATIONS. */ -#define RCSID "$Id: sys-solaris.c,v 1.2 2000/04/21 01:27:57 masputra Exp $" - #include <limits.h> #include <stdio.h> #include <stddef.h> @@ -89,10 +87,6 @@ #endif /* INET6 */ #include "ccp.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - #define PPPSTRTIMOUT 1 /* Timeout in seconds for ioctl */ #define MAX_POLLFDS 32 #define NMODULES 32 diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/upap.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/upap.c index b9263af55b..585f57d31f 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/upap.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/upap.c @@ -31,19 +31,12 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#define RCSID "$Id: upap.c,v 1.23 1999/11/20 05:11:47 paulus Exp $" - #include <stdio.h> #include <string.h> #include "pppd.h" #include "upap.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - static bool hide_password = 1; /* diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/utils.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/utils.c index e7410fa87b..d1d12849d4 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/utils.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/utils.c @@ -31,9 +31,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#define RCSID "$Id: utils.c,v 1.10 2000/03/27 01:36:48 paulus Exp $" - #ifdef __linux__ #define _GNU_SOURCE #endif @@ -63,10 +60,6 @@ #include "pppd.h" -#if !defined(lint) && !defined(_lint) -static const char rcsid[] = RCSID; -#endif - #if defined(SUNOS4) extern char *strerror(); #endif diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppstats/pppstats.c b/usr/src/cmd/cmd-inet/usr.bin/pppstats/pppstats.c index b29c7a80d4..204df84699 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppstats/pppstats.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppstats/pppstats.c @@ -38,12 +38,6 @@ #define const #endif -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef lint -static const char rcsid[] = "$Id: pppstats.c,v 1.27 1999/08/13 06:46:23 paulus Exp $"; -#endif - #include <stdio.h> #include <stddef.h> #include <stdlib.h> diff --git a/usr/src/cmd/hal/hald/device_info.c b/usr/src/cmd/hal/hald/device_info.c index e4e1ae7fee..8d557a6ea6 100644 --- a/usr/src/cmd/hal/hald/device_info.c +++ b/usr/src/cmd/hal/hald/device_info.c @@ -1368,7 +1368,6 @@ process_fdi_file (const char *dir, const char *filename, char buf[512]; FILE *file; int filesize; - size_t read; char *filebuf; dbus_bool_t device_matched; XML_Parser parser; @@ -1400,7 +1399,7 @@ process_fdi_file (const char *dir, const char *filename, HAL_ERROR (("Could not allocate %d bytes for file %s", filesize, buf)); goto out; } - read = fread (filebuf, sizeof (char), filesize, file); + (void) fread (filebuf, sizeof (char), filesize, file); /* initialize parsing context */ parsing_context = diff --git a/usr/src/cmd/hal/hald/hald.c b/usr/src/cmd/hal/hald/hald.c index c2ed17756e..c05e45cb06 100644 --- a/usr/src/cmd/hal/hald/hald.c +++ b/usr/src/cmd/hal/hald/hald.c @@ -241,7 +241,6 @@ static GIOChannel *sigterm_iochn; static void handle_sigterm (int value) { - ssize_t written; static char marker[1] = {'S'}; /* write a 'S' character to the other end to tell about @@ -250,7 +249,7 @@ handle_sigterm (int value) * defer this since UNIX signal handlers are evil * * Oh, and write(2) is indeed reentrant */ - written = write (sigterm_unix_signal_pipe_fds[1], marker, 1); + (void) write (sigterm_unix_signal_pipe_fds[1], marker, 1); } static gboolean @@ -362,7 +361,6 @@ int main (int argc, char *argv[]) { GMainLoop *loop; - guint sigterm_iochn_listener_source_id; char *path; char newpath[512]; @@ -475,7 +473,6 @@ main (int argc, char *argv[]) int child_pid; int dev_null_fd; int pf; - ssize_t written; char pid[9]; HAL_INFO (("Will daemonize")); @@ -529,7 +526,7 @@ main (int argc, char *argv[]) /* Make a new one */ if ((pf= open (HALD_PID_FILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644)) > 0) { snprintf (pid, sizeof(pid), "%lu\n", (long unsigned) getpid ()); - written = write (pf, pid, strlen(pid)); + (void) write (pf, pid, strlen(pid)); close (pf); atexit (delete_pid); } @@ -554,7 +551,7 @@ main (int argc, char *argv[]) DIE (("Could not create GIOChannel")); /* get callback when there is data to read */ - sigterm_iochn_listener_source_id = g_io_add_watch ( + (void) g_io_add_watch ( sigterm_iochn, G_IO_IN, sigterm_iochn_data, NULL); /* Finally, setup unix signal handler for TERM */ @@ -613,7 +610,6 @@ next: void osspec_probe_done (void) { - ssize_t written; char buf[1] = {0}; HAL_INFO (("Device probing completed")); @@ -624,7 +620,7 @@ osspec_probe_done (void) } /* tell parent to exit */ - written = write (startup_daemonize_pipe[1], buf, sizeof (buf)); + (void) write (startup_daemonize_pipe[1], buf, sizeof (buf)); close (startup_daemonize_pipe[0]); close (startup_daemonize_pipe[1]); diff --git a/usr/src/cmd/hal/hald/hald_dbus.c b/usr/src/cmd/hal/hald/hald_dbus.c index e3b2046201..1d7655e158 100644 --- a/usr/src/cmd/hal/hald/hald_dbus.c +++ b/usr/src/cmd/hal/hald/hald_dbus.c @@ -1071,7 +1071,7 @@ device_set_multiple_properties (DBusConnection *connection, DBusMessage *message DBusMessageIter dict_entry_iter, var_iter, array_iter; const char *key; int change_type; - dbus_bool_t rc; + dbus_bool_t rc __unused; dbus_message_iter_recurse (&dict_iter, &dict_entry_iter); dbus_message_iter_get_basic (&dict_entry_iter, &key); diff --git a/usr/src/cmd/hal/hald/solaris/devinfo_storage.c b/usr/src/cmd/hal/hald/solaris/devinfo_storage.c index 0bf1a563dd..bfe027ad25 100644 --- a/usr/src/cmd/hal/hald/solaris/devinfo_storage.c +++ b/usr/src/cmd/hal/hald/solaris/devinfo_storage.c @@ -1576,14 +1576,12 @@ devinfo_volume_force_unmount_cb (HalDevice *d, guint32 exit_type, static void devinfo_volume_force_unmount (HalDevice *d, void *end_token) { - const char *device_file; const char *mount_point; char *unmount_stdin; char *extra_env[2]; extra_env[0] = "HAL_METHOD_INVOKED_BY_UID=0"; extra_env[1] = NULL; - device_file = hal_device_property_get_string (d, "block.device"); mount_point = hal_device_property_get_string (d, "volume.mount_point"); if (mount_point == NULL || strlen (mount_point) == 0 || !hal_util_is_mounted_by_hald (mount_point)) { diff --git a/usr/src/cmd/hal/probing/network-printer/probe-snmp.c b/usr/src/cmd/hal/probing/network-printer/probe-snmp.c index 7645ff9977..63a17de47f 100644 --- a/usr/src/cmd/hal/probing/network-printer/probe-snmp.c +++ b/usr/src/cmd/hal/probing/network-printer/probe-snmp.c @@ -5,8 +5,6 @@ * Licensed under the Academic Free License version 2.1 */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> @@ -52,7 +50,6 @@ hrDeviceDesc_to_info(char *string, char **manufacturer, char **model, static struct snmp_pdu * snmp_get_item(char *host, char *community, char *mib_item) { - int status; struct snmp_session session, *ss; struct snmp_pdu *request = NULL, *result = NULL; oid Oid[MAX_OID_LEN]; @@ -77,7 +74,7 @@ snmp_get_item(char *host, char *community, char *mib_item) request = snmp_pdu_create(SNMP_MSG_GET); snmp_add_null_var(request, Oid, oid_len); - status = snmp_synch_response(ss, request, &result); + (void) snmp_synch_response(ss, request, &result); snmp_close(ss); diff --git a/usr/src/cmd/krb5/kadmin/server/ovsec_kadmd.c b/usr/src/cmd/krb5/kadmin/server/ovsec_kadmd.c index d8f419f0c2..11fe918c06 100644 --- a/usr/src/cmd/krb5/kadmin/server/ovsec_kadmd.c +++ b/usr/src/cmd/krb5/kadmin/server/ovsec_kadmd.c @@ -209,13 +209,13 @@ static void display_status_1(m, code, type) OM_uint32 code; int type; { - OM_uint32 maj_stat, min_stat; + OM_uint32 min_stat; gss_buffer_desc msg; OM_uint32 msg_ctx; msg_ctx = 0; while (1) { - maj_stat = gss_display_status(&min_stat, code, + (void) gss_display_status(&min_stat, code, type, GSS_C_NULL_OID, &msg_ctx, &msg); fprintf(stderr, "GSS-API error %s: %s\n", m, diff --git a/usr/src/cmd/krb5/krb5kdc/main.c b/usr/src/cmd/krb5/krb5kdc/main.c index c75f8d3994..4a0f854c65 100644 --- a/usr/src/cmd/krb5/krb5kdc/main.c +++ b/usr/src/cmd/krb5/krb5kdc/main.c @@ -332,7 +332,6 @@ init_realm(krb5_context kcontext, char *progname, kdc_realm_t *rdp, char *realm, } if (!rkey_init_done) { - krb5_data seed; #ifdef KRB5_KRB4_COMPAT krb5_keyblock temp_key; #endif @@ -340,16 +339,6 @@ init_realm(krb5_context kcontext, char *progname, kdc_realm_t *rdp, char *realm, * If all that worked, then initialize the random key * generators. */ - - seed.length = rdp->realm_mkey.length; - seed.data = (char *)rdp->realm_mkey.contents; -/* SUNW14resync - XXX */ -#if 0 - if ((kret = krb5_c_random_add_entropy(rdp->realm_context, - KRB5_C_RANDSOURCE_TRUSTEDPARTY, &seed))) - goto whoops; -#endif - #ifdef KRB5_KRB4_COMPAT if ((kret = krb5_c_make_random_key(rdp->realm_context, ENCTYPE_DES_CBC_CRC, &temp_key))) { @@ -451,7 +440,7 @@ initialize_realms(krb5_context kcontext, int argc, char **argv) int c; char *db_name = (char *) NULL; char *mkey_name = (char *) NULL; - char *rcname = KDCRCACHE; + char *rcname __unused; char *lrealm = NULL; krb5_error_code retval; krb5_enctype menctype = ENCTYPE_UNKNOWN; @@ -469,6 +458,8 @@ initialize_realms(krb5_context kcontext, int argc, char **argv) #endif extern char *optarg; + rcname = KDCRCACHE; + if (!krb5_aprof_init(DEFAULT_KDC_PROFILE, KDC_PROFILE_ENV, &aprof)) { hierarchy[0] = "kdcdefaults"; hierarchy[1] = "kdc_ports"; diff --git a/usr/src/cmd/mv/mv.c b/usr/src/cmd/mv/mv.c index c82887a807..e53023df95 100644 --- a/usr/src/cmd/mv/mv.c +++ b/usr/src/cmd/mv/mv.c @@ -1354,14 +1354,16 @@ static int chg_time(char *to, struct stat ss) { struct timespec times[2]; +#ifdef XPG4 int rc; +#endif times[0] = ss.st_atim; times[1] = ss.st_mtim; +#ifdef XPG4 rc = utimensat(AT_FDCWD, to, times, ISLNK(s1) ? AT_SYMLINK_NOFOLLOW : 0); -#ifdef XPG4 if ((pflg || mve) && rc != 0) { (void) fprintf(stderr, gettext("%s: cannot set times for %s: "), cmd, to); @@ -1369,6 +1371,9 @@ chg_time(char *to, struct stat ss) if (pflg) return (1); } +#else + (void) utimensat(AT_FDCWD, to, times, + ISLNK(s1) ? AT_SYMLINK_NOFOLLOW : 0); #endif return (0); diff --git a/usr/src/cmd/pcitool/pcitool_ui.c b/usr/src/cmd/pcitool/pcitool_ui.c index b3c2888b46..ddeccea4bf 100644 --- a/usr/src/cmd/pcitool/pcitool_ui.c +++ b/usr/src/cmd/pcitool/pcitool_ui.c @@ -898,10 +898,10 @@ static int parse_nexus_opts(char *input, uint64_t *flags_arg, uint8_t *bank_arg, uint64_t *base_addr_arg) { - typedef enum { + enum nexus_opts_index { bank = 0, base - } nexus_opts_index_t; + }; static char *nexus_opts[] = { "bank", @@ -1059,7 +1059,7 @@ parse_device_opts( uint8_t *func_arg, uint8_t *bank_arg) { /* Needed by getsubopt(3C) */ - typedef enum { + enum bdf_opts_index { bus = 0, dev = 1, func = 2, @@ -1073,7 +1073,7 @@ parse_device_opts( bar4 = 10, bar5 = 11, rom = 12 - } bdf_opts_index_t; + }; /* Needed by getsubopt(3C) */ static char *bdf_opts[] = { @@ -1436,12 +1436,12 @@ parse_probeone_opts( char *input, uint64_t *flags_arg, uint8_t *bus_arg, uint8_t *device_arg, uint8_t *func_arg) { - typedef enum { + enum p1_bdf_opts_index { bus = 0, dev = 1, func = 2, bdf = 3 - } p1_bdf_opts_index_t; + }; /* Needed by getsubopt(3C) */ static char *p1_bdf_opts[] = { @@ -1515,7 +1515,8 @@ parse_probeone_opts( #ifdef DEBUG static void -dump_struct(pcitool_uiargs_t *dumpthis) { +dump_struct(pcitool_uiargs_t *dumpthis) +{ (void) printf("flags:0x%x\n", dumpthis->flags); (void) printf("bus:%d (0x%x)\n", dumpthis->bus, dumpthis->bus); diff --git a/usr/src/cmd/sendmail/Makefile.cmd b/usr/src/cmd/sendmail/Makefile.cmd index 52cd520885..a90a1502ac 100644 --- a/usr/src/cmd/sendmail/Makefile.cmd +++ b/usr/src/cmd/sendmail/Makefile.cmd @@ -32,6 +32,8 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-empty-body CERRWARN += -_gcc=-Wno-unused-variable +CERRWARN += -_gcc=-Wno-unused-but-set-parameter +CERRWARN += -_gcc=-Wno-unused-but-set-variable DBMDEF= -DNDBM -DNEWDB -DNIS -DUSERDB -DMAP_REGEX -DLDAPMAP ROOTLIBSMTPSM = $(ROOTLIB)/smtp/sendmail diff --git a/usr/src/common/lzma/LzmaEnc.c b/usr/src/common/lzma/LzmaEnc.c index c8cb228955..0d857945f1 100644 --- a/usr/src/common/lzma/LzmaEnc.c +++ b/usr/src/common/lzma/LzmaEnc.c @@ -1918,12 +1918,12 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { UInt32 beforeSize = kNumOpts; - Bool btMode; + if (!RangeEnc_Alloc(&p->rc, alloc)) return SZ_ERROR_MEM; - btMode = (p->matchFinderBase.btMode != 0); #ifdef COMPRESS_MF_MT - p->mtMode = (p->multiThread && !p->fastMode && btMode); + p->mtMode = (p->multiThread && !p->fastMode && + (p->matchFinderBase.btMode != 0)); #endif { diff --git a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com index 0d437868bf..cc5f115250 100644 --- a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com +++ b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com @@ -256,6 +256,7 @@ CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable +CERRWARN += -_gcc=-Wno-unused-but-set-variable CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-empty-body diff --git a/usr/src/lib/krb5/kadm5/srv/svr_principal.c b/usr/src/lib/krb5/kadm5/srv/svr_principal.c index 052f3c80c5..2097ce03a4 100644 --- a/usr/src/lib/krb5/kadm5/srv/svr_principal.c +++ b/usr/src/lib/krb5/kadm5/srv/svr_principal.c @@ -21,14 +21,8 @@ /* * Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved - * - * $Header$ */ -#if !defined(lint) && !defined(__CODECENTER__) -static char *rcsid = "$Header$"; -#endif - #include <sys/types.h> #include <sys/time.h> #include <errno.h> @@ -216,7 +210,7 @@ kadm5_create_principal_3(void *server_handle, osa_princ_ent_rec adb; kadm5_policy_ent_rec polent; krb5_int32 now; - krb5_tl_data *tl_data_orig, *tl_data_tail; + krb5_tl_data *tl_data_tail; unsigned int ret; kadm5_server_handle_t handle = server_handle; @@ -369,7 +363,6 @@ kadm5_create_principal_3(void *server_handle, if (mask & KADM5_TL_DATA) { /* splice entry->tl_data onto the front of kdb.tl_data */ - tl_data_orig = kdb.tl_data; for (tl_data_tail = entry->tl_data; tl_data_tail; tl_data_tail = tl_data_tail->tl_data_next) { diff --git a/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash.c b/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash.c index 7df1c536e9..ac6ca031df 100644 --- a/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash.c +++ b/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash.c @@ -1,4 +1,4 @@ -/*- +/* * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -34,10 +34,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)hash.c 8.12 (Berkeley) 11/7/95"; -#endif /* LIBC_SCCS and not lint */ - #undef _TS_ERRNO_ #include <sys/param.h> #include <sys/stat.h> @@ -329,9 +325,7 @@ init_hash(hashp, file, info) const HASHINFO *info; { struct stat statbuf; - int32_t nelem; - nelem = 1; hashp->hdr.nkeys = 0; hashp->hdr.lorder = DB_BYTE_ORDER; hashp->hdr.bsize = DEF_BUCKET_SIZE; @@ -436,11 +430,10 @@ hget_header(hashp, page_size) HTAB *hashp; u_int32_t page_size; { - u_int32_t num_copied, i; + u_int32_t num_copied; u_int8_t *hdr_dest; num_copied = 0; - i = 0; hdr_dest = (u_int8_t *)&hashp->hdr; diff --git a/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash_bigkey.c b/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash_bigkey.c index a96b8aa985..f71ac2c3d8 100644 --- a/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash_bigkey.c +++ b/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash_bigkey.c @@ -1,6 +1,4 @@ -#pragma ident "%Z%%M% %I% %E% SMI" - -/*- +/* * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -36,10 +34,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)hash_bigkey.c 8.5 (Berkeley) 11/2/95"; -#endif /* LIBC_SCCS and not lint */ - /* * PACKAGE: hash * DESCRIPTION: @@ -196,12 +190,10 @@ __find_bigpair(hashp, cursorp, key, size) PAGE16 *pagep, *hold_pagep; db_pgno_t next_pgno; int32_t ksize; - u_int16_t bytes; int8_t *kkey; ksize = size; kkey = key; - bytes = 0; hold_pagep = NULL; /* Chances are, hashp->cpage is the base page. */ diff --git a/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash_page.c b/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash_page.c index b95090def2..23f8d7745c 100644 --- a/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash_page.c +++ b/usr/src/lib/krb5/plugins/kdb/db2/libdb2/hash/hash_page.c @@ -1,6 +1,4 @@ -#pragma ident "%Z%%M% %I% %E% SMI" - -/*- +/* * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -36,10 +34,6 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)hash_page.c 8.11 (Berkeley) 11/7/95"; -#endif /* LIBC_SCCS and not lint */ - /* * PACKAGE: hashing * @@ -74,7 +68,9 @@ static char sccsid[] = "@(#)hash_page.c 8.11 (Berkeley) 11/7/95"; static int32_t add_bigptr __P((HTAB *, ITEM_INFO *, indx_t)); static u_int32_t *fetch_bitmap __P((HTAB *, int32_t)); static u_int32_t first_free __P((u_int32_t)); +#ifdef DEBUG static indx_t next_realkey __P((PAGE16 *, indx_t)); +#endif static u_int16_t overflow_page __P((HTAB *)); static void page_init __P((HTAB *, PAGE16 *, db_pgno_t, u_int8_t)); static indx_t prev_realkey __P((PAGE16 *, indx_t)); @@ -254,14 +250,9 @@ putpair(p, key, val) * Returns the index of the next non-bigkey pair after n on the page. * Returns -1 if there are no more non-big things on the page. */ +#ifdef DEBUG static indx_t -#ifdef __STDC__ next_realkey(PAGE16 * pagep, indx_t n) -#else -next_realkey(pagep, n) - PAGE16 *pagep; - u_int32_t n; -#endif { indx_t i; @@ -270,6 +261,7 @@ next_realkey(pagep, n) return (i); return (-1); } +#endif /* * Returns the index of the previous non-bigkey pair after n on the page. @@ -307,7 +299,7 @@ __delpair(hashp, cursorp, item_info) PAGE16 *pagep; indx_t ndx; short check_ndx; - int16_t delta, len, next_key; + int16_t delta, len; int32_t n; u_int8_t *src, *dest; @@ -378,9 +370,8 @@ __delpair(hashp, cursorp, item_info) /* Adjust the offsets. */ for (n = ndx; n < NUM_ENT(pagep) - 1; n++) if (KEY_OFF(pagep, (n + 1)) != BIGPAIR) { - next_key = next_realkey(pagep, n); #ifdef DEBUG - assert(next_key != -1); + assert(next_realkey(pagep, n) != -1); #endif KEY_OFF(pagep, n) = KEY_OFF(pagep, (n + 1)) + delta; DATA_OFF(pagep, n) = DATA_OFF(pagep, (n + 1)) + delta; diff --git a/usr/src/lib/libbsm/Makefile b/usr/src/lib/libbsm/Makefile index 514358a52f..86c7bb9802 100644 --- a/usr/src/lib/libbsm/Makefile +++ b/usr/src/lib/libbsm/Makefile @@ -148,7 +148,7 @@ clean_files: -$(RM) $(CLEANFILES) $(GENSRCS): $(ADTXMLFILE) $(AUDITXML) - $(PERL) $(AUDITXML) -o $(COMMONDIR) $(ADTXMLFILE) + $(PERL) -I. $(AUDITXML) -o $(COMMONDIR) $(ADTXMLFILE) $(ETCSECURITYFILES) $(RESA): \ $(ETCSECURITY) \ diff --git a/usr/src/lib/libc/port/fp/_base_sup.c b/usr/src/lib/libc/port/fp/_base_sup.c index b07957740c..52e258d002 100644 --- a/usr/src/lib/libc/port/fp/_base_sup.c +++ b/usr/src/lib/libc/port/fp/_base_sup.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "lint.h" #include <sys/types.h> #include "base_conversion.h" @@ -56,7 +54,7 @@ void __base_conversion_set_exception(fp_exception_field_type ef) { double t; - volatile double tstored; + volatile double tstored __unused; if (ef == (1 << fp_inexact)) { t = 9.999999962747097015E-1; diff --git a/usr/src/lib/libc/port/print/doprnt.c b/usr/src/lib/libc/port/print/doprnt.c index 3bb54445ab..0c0fe0cacb 100644 --- a/usr/src/lib/libc/port/print/doprnt.c +++ b/usr/src/lib/libc/port/print/doprnt.c @@ -449,7 +449,6 @@ _ndoprnt(const char *format, va_list in_args, FILE *iop, int prflag) size_t bpsize; wchar_t *p; char *cbp; - char *cp; #else /* _WIDE */ /* Starting and ending points for value to be printed */ @@ -460,7 +459,6 @@ _ndoprnt(const char *format, va_list in_args, FILE *iop, int prflag) int prec = 0; ssize_t width; ssize_t num; - ssize_t sec_display; wchar_t *wp; ssize_t preco; ssize_t wcount = 0; @@ -470,13 +468,13 @@ _ndoprnt(const char *format, va_list in_args, FILE *iop, int prflag) int quote; /* ' */ int retcode; - #ifdef _WIDE /* Format code */ wchar_t fcode; #else /* _WIDE */ /* Format code */ char fcode; + ssize_t sec_display; #endif /* _WIDE */ /* Number of padding zeroes required on the left and right */ @@ -714,8 +712,10 @@ _ndoprnt(const char *format, va_list in_args, FILE *iop, int prflag) format++; wflag = 0; lflag = 0; - sec_display = 0; quote = 0; +#ifndef _WIDE + sec_display = 0; +#endif charswitch: @@ -1840,7 +1840,6 @@ wide_S: return (EOF); } nwc = mbstowcs(wstr, cbp, nwc); - cp = cbp + strlen(cbp); wcount = nwc; bp = wstr; p = wstr + nwc; diff --git a/usr/src/lib/libc/port/regex/engine.c b/usr/src/lib/libc/port/regex/engine.c index 68cf24a5da..c66c08e59e 100644 --- a/usr/src/lib/libc/port/regex/engine.c +++ b/usr/src/lib/libc/port/regex/engine.c @@ -382,7 +382,7 @@ dissect(struct match *m, const char *start, const char *stop, sopno startst, const char *ssp; /* start of string matched by subsubRE */ const char *sep; /* end of string matched by subsubRE */ const char *oldssp; /* previous ssp */ - const char *dp; + const char *dp __unused; AT("diss", start, stop, startst, stopst); sp = start; diff --git a/usr/src/pkg/manifests/driver-storage-nvme.mf b/usr/src/pkg/manifests/driver-storage-nvme.mf index 45b5a333f7..d2742de3c2 100644 --- a/usr/src/pkg/manifests/driver-storage-nvme.mf +++ b/usr/src/pkg/manifests/driver-storage-nvme.mf @@ -38,7 +38,9 @@ dir path=usr/sbin dir path=usr/share dir path=usr/share/man dir path=usr/share/man/man7d -driver name=nvme alias=pciexclass,010802 class=disk perms="* 0600 root sys" +driver name=nvme class=disk perms="* 0600 root sys" \ + alias=pciclass,010802 \ + alias=pciexclass,010802 file path=kernel/drv/$(ARCH64)/nvme group=sys file path=kernel/drv/nvme group=sys file path=kernel/drv/nvme.conf group=sys diff --git a/usr/src/test/util-tests/tests/libsff/Makefile b/usr/src/test/util-tests/tests/libsff/Makefile index 99a3053259..4f40e7ef4d 100644 --- a/usr/src/test/util-tests/tests/libsff/Makefile +++ b/usr/src/test/util-tests/tests/libsff/Makefile @@ -41,6 +41,8 @@ PROGS = $(DIFF_PROGS) \ $(ERR_PROGS) \ libsff_strings +LINTS = $(PROGS:%=%.ln) + SCRIPTS = libsff include $(SRC)/cmd/Makefile.cmd @@ -60,15 +62,21 @@ CPPFLAGS += -I$(SRC)/lib/libsff/common $(ERR_PROGS) := LDLIBS += -lsff $(DIFF_PROGS) := LDLIBS += -lsff -lnvpair libsff_strings := LDLIBS += -lsff -lnvpair +$(ERR_PROGS).ln := LDLIBS += -lsff +$(DIFF_PROGS).ln := LDLIBS += -lsff -lnvpair +libsff_strings.ln := LDLIBS += -lsff -lnvpair all: $(PROGS) install: all $(CMDS) $(OUTFILES) -lint: lint_SRCS +lint: $(LINTS) + +%.ln: %.c + $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 $< $(LDLIBS) clobber: clean - -$(RM) $(PROGS) + -$(RM) $(PROGS) $(LINTS) clean: diff --git a/usr/src/test/util-tests/tests/libsff/libsff_8636_tech.c b/usr/src/test/util-tests/tests/libsff/libsff_8636_tech.c index 21f02cab8c..736e6101c4 100644 --- a/usr/src/test/util-tests/tests/libsff/libsff_8636_tech.c +++ b/usr/src/test/util-tests/tests/libsff/libsff_8636_tech.c @@ -68,7 +68,7 @@ main(void) if ((ret = libsff_parse(buf, sizeof (buf), 0xa0, &nvl)) != 0) { errx(1, "TEST FAILED: failed to parse QSFP device tech " - "%d: %s\n", i, strerror(errno)); + "%d: %s\n", i, strerror(ret)); } lst_print_array(nvl, LIBSFF_KEY_TRAN_TECH); diff --git a/usr/src/test/util-tests/tests/libsff/libsff_8636_temp.c b/usr/src/test/util-tests/tests/libsff/libsff_8636_temp.c index 5e3ba70cd4..beeddc5e15 100644 --- a/usr/src/test/util-tests/tests/libsff/libsff_8636_temp.c +++ b/usr/src/test/util-tests/tests/libsff/libsff_8636_temp.c @@ -44,13 +44,13 @@ main(void) buf[SFF_8636_MAX_CASE_TEMP] = i; if ((ret = libsff_parse(buf, sizeof (buf), 0xa0, &nvl)) != 0) { errx(1, "TEST FAILED: failed to parse QSFP connector " - "%d: %s\n", i, strerror(errno)); + "%d: %s\n", i, strerror(ret)); } if ((ret = nvlist_lookup_string(nvl, LIBSFF_KEY_MAX_CASE_TEMP, &val)) != 0) { errx(1, "TEST FAILED: failed to find connector when " - "parsing key %d: %s\n", i, strerror(errno)); + "parsing key %d: %s\n", i, strerror(ret)); } (void) puts(val); diff --git a/usr/src/test/util-tests/tests/libsff/libsff_efault.c b/usr/src/test/util-tests/tests/libsff/libsff_efault.c index 7f57529d81..e482e8ef5d 100644 --- a/usr/src/test/util-tests/tests/libsff/libsff_efault.c +++ b/usr/src/test/util-tests/tests/libsff/libsff_efault.c @@ -28,10 +28,10 @@ int main(void) { - int ret; void *addr; nvlist_t *nvl; size_t len = getpagesize(); + int ret; /* * Get an unreadable page @@ -46,8 +46,8 @@ main(void) } if ((ret = libsff_parse(addr, 128, 0xa0, &nvl)) != EFAULT) { - errx(1, "TEST FAILED: failed to return EFAULT on bad" - "data buffer\n"); + errx(1, "TEST FAILED: failed to return EFAULT on bad " + "data buffer (%s instead)\n", strerror(ret)); } return (0); diff --git a/usr/src/test/util-tests/tests/libsff/libsff_einval.c b/usr/src/test/util-tests/tests/libsff/libsff_einval.c index ac835f95e7..9e87e2b4f7 100644 --- a/usr/src/test/util-tests/tests/libsff/libsff_einval.c +++ b/usr/src/test/util-tests/tests/libsff/libsff_einval.c @@ -28,9 +28,9 @@ int main(void) { - int ret; uint8_t buf[256]; nvlist_t *nvl; + int ret; bzero(buf, sizeof (buf)); if ((ret = libsff_parse(NULL, sizeof (buf), 0xa0, &nvl)) != EINVAL) { @@ -38,50 +38,54 @@ main(void) } if ((ret = libsff_parse(buf, sizeof (buf), 0xa0, NULL)) != EINVAL) { - errx(1, "TEST FAILED: failed to return EINVAL on NULL nvl"); + errx(1, "TEST FAILED: failed to return EINVAL on NULL nvl " + "(%s instead)", strerror(ret)); } if ((ret = libsff_parse(buf, sizeof (buf), 0xa1, &nvl)) != EINVAL) { - errx(1, "TEST FAILED: failed to return EINVAL on bad page"); + errx(1, "TEST FAILED: failed to return EINVAL on bad page " + "(%s instead)", strerror(ret)); } if ((ret = libsff_parse(buf, sizeof (buf), 0, &nvl)) != EINVAL) { - errx(1, "TEST FAILED: failed to return EINVAL on bad page"); + errx(1, "TEST FAILED: failed to return EINVAL on bad page " + "(%s instead)", strerror(ret)); } if ((ret = libsff_parse(buf, sizeof (buf), 0xff, &nvl)) != EINVAL) { - errx(1, "TEST FAILED: failed to return EINVAL on bad page"); + errx(1, "TEST FAILED: failed to return EINVAL on bad page " + "(%s instead)", strerror(ret)); } if ((ret = libsff_parse(buf, 0, 0xa0, &nvl)) != EINVAL) { errx(1, "TEST FAILED: failed to return EINVAL on bad 8476 " - "size"); + "size (%s instead)", strerror(ret)); } if ((ret = libsff_parse(buf, 50, 0xa0, &nvl)) != EINVAL) { errx(1, "TEST FAILED: failed to return EINVAL on bad 8476 " - "size"); + "size (%s instead)", strerror(ret)); } buf[SFF_8472_IDENTIFIER] = SFF_8024_ID_QSFP; if ((ret = libsff_parse(buf, 0, 0xa0, &nvl)) != EINVAL) { errx(1, "TEST FAILED: failed to return EINVAL on bad 8476 " - "size"); + "size (%s instead)", strerror(ret)); } if ((ret = libsff_parse(buf, 50, 0xa0, &nvl)) != EINVAL) { errx(1, "TEST FAILED: failed to return EINVAL on bad 8476 " - "size"); + "size (%s instead)", strerror(ret)); } if ((ret = libsff_parse(buf, 96, 0xa0, &nvl)) != EINVAL) { errx(1, "TEST FAILED: failed to return EINVAL on bad 8635 " - "size"); + "size (%s instead)", strerror(ret)); } if ((ret = libsff_parse(buf, 128, 0xa0, &nvl)) != EINVAL) { errx(1, "TEST FAILED: failed to return EINVAL on bad 8635 " - "size"); + "size (%s instead)", strerror(ret)); } return (0); diff --git a/usr/src/tools/scripts/cstyle.pl b/usr/src/tools/scripts/cstyle.pl index e5f8c0aca5..c515dce980 100644 --- a/usr/src/tools/scripts/cstyle.pl +++ b/usr/src/tools/scripts/cstyle.pl @@ -384,7 +384,7 @@ line: while (<$filehandle>) { # is this the beginning or ending of a function? # (not if "struct foo\n{\n") - if (/^{$/ && $prev =~ /\)\s*(const\s*)?(\/\*.*\*\/\s*)?\\?$/) { + if (/^\{$/ && $prev =~ /\)\s*(const\s*)?(\/\*.*\*\/\s*)?\\?$/) { $in_function = 1; $in_declaration = 1; $in_function_header = 0; @@ -392,7 +392,7 @@ line: while (<$filehandle>) { $prev = $line; next line; } - if (/^}\s*(\/\*.*\*\/\s*)*$/) { + if (/^\}\s*(\/\*.*\*\/\s*)*$/) { if ($prev =~ /^\s*return\s*;/) { err_prev("unneeded return at end of function"); } @@ -402,7 +402,7 @@ line: while (<$filehandle>) { next line; } if ($in_function_header && ! /^ (\w|\.)/ ) { - if (/^{}$/) { + if (/^\{\}$/) { $in_function_header = 0; $function_header_full_indent = 0; } elsif ($picky && ! (/^\t/ && $function_header_full_indent != 0)) { @@ -421,7 +421,7 @@ line: while (<$filehandle>) { $function_header_full_indent = 1; } } - if ($in_function_header && /^{$/) { + if ($in_function_header && /^\{$/) { $in_function_header = 0; $function_header_full_indent = 0; $in_function = 1; @@ -430,7 +430,7 @@ line: while (<$filehandle>) { $in_function_header = 0; $function_header_full_indent = 0; } - if ($in_function_header && /{$/ ) { + if ($in_function_header && /\{$/ ) { if ($picky) { err("opening brace on same line as function header"); } @@ -659,14 +659,14 @@ line: while (<$filehandle>) { if (/\S\{/ && !/\{\{/) { err("missing space before left brace"); } - if ($in_function && /^\s+{/ && + if ($in_function && /^\s+\{/ && ($prev =~ /\)\s*$/ || $prev =~ /\bstruct\s+\w+$/)) { err("left brace starting a line"); } - if (/}(else|while)/) { + if (/\}(else|while)/) { err("missing space after right brace"); } - if (/}\s\s+(else|while)/) { + if (/\}\s\s+(else|while)/) { err("extra space after right brace"); } if (/\b_VOID\b|\bVOID\b|\bSTATIC\b/) { @@ -719,18 +719,18 @@ line: while (<$filehandle>) { if ($heuristic) { # cannot check this everywhere due to "struct {\n...\n} foo;" if ($in_function && !$in_declaration && - /}./ && !/}\s+=/ && !/{.*}[;,]$/ && !/}(\s|)*$/ && - !/} (else|while)/ && !/}}/) { + /\}./ && !/\}\s+=/ && !/\{.*\}[;,]$/ && !/\}(\s|)*$/ && + !/\} (else|while)/ && !/\}\}/) { err("possible bad text following right brace"); } # cannot check this because sub-blocks in # the middle of code are ok - if ($in_function && /^\s+{/) { + if ($in_function && /^\s+\{/) { err("possible left brace starting a line"); } } if (/^\s*else\W/) { - if ($prev =~ /^\s*}$/) { + if ($prev =~ /^\s*\}$/) { err_prefix($prev, "else and right brace should be on same line"); } @@ -816,8 +816,8 @@ process_indent($) # skip over enumerations, array definitions, initializers, etc. if ($cont_off <= 0 && !/^\s*$special/ && - (/(?:(?:\b(?:enum|struct|union)\s*[^\{]*)|(?:\s+=\s*)){/ || - (/^\s*{/ && $prev =~ /=\s*(?:\/\*.*\*\/\s*)*$/))) { + (/(?:(?:\b(?:enum|struct|union)\s*[^\{]*)|(?:\s+=\s*))\{/ || + (/^\s*\{/ && $prev =~ /=\s*(?:\/\*.*\*\/\s*)*$/))) { $cont_in = 0; $cont_off = tr/{/{/ - tr/}/}/; return; @@ -840,14 +840,14 @@ process_indent($) return if (/^\s*\}?$/); return if (/^\s*\}?\s*else\s*\{?$/); return if (/^\s*do\s*\{?$/); - return if (/{$/); - return if (/}[,;]?$/); + return if (/\{$/); + return if (/\}[,;]?$/); # Allow macros on their own lines return if (/^\s*[A-Z_][A-Z_0-9]*$/); # cases we don't deal with, generally non-kosher - if (/{/) { + if (/\{/) { err("stuff after {"); return; } @@ -916,7 +916,7 @@ process_indent($) # next if (@cont_paren != 0); if ($cont_special) { - if ($rest =~ /^\s*{?$/) { + if ($rest =~ /^\s*\{?$/) { $cont_in = 0; last; } diff --git a/usr/src/uts/common/io/1394/s1394_hotplug.c b/usr/src/uts/common/io/1394/s1394_hotplug.c index 40c2e19022..a020ee2d53 100644 --- a/usr/src/uts/common/io/1394/s1394_hotplug.c +++ b/usr/src/uts/common/io/1394/s1394_hotplug.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * s1394_hotplug.c * 1394 Services Layer Hotplug Routines @@ -143,7 +141,7 @@ s1394_create_devinfo(s1394_hal_t *hal, s1394_node_t *node, uint32_t *unit_dir, int node_ven, node_hw, node_spec, node_sw; /*LINTED type is unused*/ - uint32_t type, key, value; + uint32_t type __unused, key, value; uint32_t unit_spec_id, unit_sw_version; uint32_t node_spec_id, node_sw_version; uint32_t node_vendor_id, node_hw_version; @@ -690,7 +688,7 @@ s1394_offline_node(s1394_hal_t *hal, s1394_node_t *node) while (t != NULL) { TNF_PROBE_2(s1394_process_old_tree_mark, S1394_TNF_SL_HOTPLUG_STACK, "", tnf_int, node_num, node_num, - tnf_opaque, target, t); + tnf_opaque, target, t); t->target_state |= S1394_TARG_GONE; t->on_node = NULL; t = t->target_sibling; @@ -1004,17 +1002,20 @@ s1394_process_old_tree(s1394_hal_t *hal) cur_node) == B_FALSE)))) { if (onode->cur_node != NULL && CFGROM_VALID(onode) == - B_TRUE && CFGROM_VALID(onode->cur_node) == B_FALSE) - TNF_PROBE_1_DEBUG - (s1394_process_old_tree_invalid_cfgrom, + B_TRUE && + CFGROM_VALID(onode->cur_node) == B_FALSE) { + TNF_PROBE_1_DEBUG( + s1394_process_old_tree_invalid_cfgrom, S1394_TNF_SL_HOTPLUG_STACK, "", tnf_int, node_num, i); + } if (onode->cur_node != NULL && LINK_ACTIVE(onode) == - B_TRUE && LINK_ACTIVE(onode->cur_node) == B_FALSE) - TNF_PROBE_1_DEBUG - (s1394_process_old_tree_link_off, + B_TRUE && LINK_ACTIVE(onode->cur_node) == B_FALSE) { + TNF_PROBE_1_DEBUG( + s1394_process_old_tree_link_off, S1394_TNF_SL_HOTPLUG_STACK, "", tnf_int, node_num, i); + } if (s1394_offline_node(hal, onode) != DDI_SUCCESS) { TNF_PROBE_2(s1394_process_old_tree, S1394_TNF_SL_HOTPLUG_ERROR, "", tnf_string, diff --git a/usr/src/uts/intel/pcbe/p4_pcbe.c b/usr/src/uts/intel/pcbe/p4_pcbe.c index 95f075921f..d2c61d7f31 100644 --- a/usr/src/uts/intel/pcbe/p4_pcbe.c +++ b/usr/src/uts/intel/pcbe/p4_pcbe.c @@ -426,9 +426,6 @@ GEN_EVT_END * Indicates whether the "rdpmc" instruction is available on this processor. */ static int p4_rdpmc_avail = 0; - -static const uint64_t p4_cccrstop = 0; - static char *p4_eventlist[18]; /* |