diff options
author | Toomas Soome <tsoome@me.com> | 2022-10-04 15:15:08 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-10-18 21:10:21 +0300 |
commit | 4a38094c1dd4980a3761849bfbdf92ae62c568f5 (patch) | |
tree | 17fc37758760a22a22f2d8d13509d580baeb06f7 /usr | |
parent | 38864087f2024637a6b7733caa7b6fd59c9383bd (diff) | |
download | illumos-joyent-4a38094c1dd4980a3761849bfbdf92ae62c568f5.tar.gz |
15053 libc: unused parameter
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
Approved by: Dan McDonald <danmcd@mnx.io>
Diffstat (limited to 'usr')
41 files changed, 242 insertions, 340 deletions
diff --git a/usr/src/common/crypto/chacha/chacha.c b/usr/src/common/crypto/chacha/chacha.c index 5f9ef3b411..cef4aac466 100644 --- a/usr/src/common/crypto/chacha/chacha.c +++ b/usr/src/common/crypto/chacha/chacha.c @@ -51,7 +51,7 @@ static const char sigma[16] = "expand 32-byte k"; static const char tau[16] = "expand 16-byte k"; void -chacha_keysetup(chacha_ctx_t *x,const u8 *k,u32 kbits,u32 ivbits) +chacha_keysetup(chacha_ctx_t *x, const u8 *k, u32 kbits, u32 ivbits __unused) { const char *constants; @@ -76,7 +76,7 @@ chacha_keysetup(chacha_ctx_t *x,const u8 *k,u32 kbits,u32 ivbits) } void -chacha_ivsetup(chacha_ctx_t *x,const u8 *iv) +chacha_ivsetup(chacha_ctx_t *x, const u8 *iv) { x->chacha_input[12] = 0; x->chacha_input[13] = 0; @@ -85,7 +85,7 @@ chacha_ivsetup(chacha_ctx_t *x,const u8 *iv) } void -chacha_encrypt_bytes(chacha_ctx_t *x,const u8 *m,u8 *c,u32 bytes) +chacha_encrypt_bytes(chacha_ctx_t *x, const u8 *m, u8 *c, u32 bytes) { u32 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15; u32 j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15; diff --git a/usr/src/lib/libc/amd64/gen/sync_instruction_memory.c b/usr/src/lib/libc/amd64/gen/sync_instruction_memory.c index 8122d79879..662d3a1daa 100644 --- a/usr/src/lib/libc/amd64/gen/sync_instruction_memory.c +++ b/usr/src/lib/libc/amd64/gen/sync_instruction_memory.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/asm_linkage.h> /* @@ -35,8 +33,7 @@ * This is a no-op on x86 because it has a uniform cache. */ -/* ARGSUSED */ void -sync_instruction_memory(caddr_t addr, int len) +sync_instruction_memory(caddr_t addr __unused, int len __unused) { } diff --git a/usr/src/lib/libc/amd64/threads/machdep.c b/usr/src/lib/libc/amd64/threads/machdep.c index 81b8ee37ec..2fe575520a 100644 --- a/usr/src/lib/libc/amd64/threads/machdep.c +++ b/usr/src/lib/libc/amd64/threads/machdep.c @@ -33,9 +33,8 @@ extern int getlwpstatus(thread_t, lwpstatus_t *); extern int putlwpregs(thread_t, prgregset_t); -/* ARGSUSED2 */ void * -setup_top_frame(void *stk, size_t stksize, ulwp_t *ulwp) +setup_top_frame(void *stk, size_t stksize, ulwp_t *ulwp __unused) { uint64_t *stack; struct { diff --git a/usr/src/lib/libc/amd64/unwind/thrp_unwind.c b/usr/src/lib/libc/amd64/unwind/thrp_unwind.c index 648a93894d..ecf86bf255 100644 --- a/usr/src/lib/libc/amd64/unwind/thrp_unwind.c +++ b/usr/src/lib/libc/amd64/unwind/thrp_unwind.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "lint.h" #include "thr_uberdata.h" #include "stack_unwind.h" @@ -39,15 +37,13 @@ */ #define CFA_ADJUST 16 -/* ARGSUSED */ static _Unwind_Reason_Code -posix_stop_func( - int version, - _Unwind_Action _Unwind_actions, - uint64_t exceptionClass, - struct _Unwind_Exception *exceptionObject, - struct _Unwind_Context *context, - void *func_arg) +posix_stop_func(int version __unused, + _Unwind_Action _Unwind_actions __unused, + uint64_t exceptionClass __unused, + struct _Unwind_Exception *exceptionObject, + struct _Unwind_Context *context, + void *func_arg) { __cleanup_t **headp = (__cleanup_t **)func_arg; __cleanup_t *head; @@ -82,9 +78,8 @@ posix_stop_func( * we just need to call the Posix cleanup handlers. */ -/* ARGSUSED */ void -_thrp_unwind(void *dummy) +_thrp_unwind(void *dummy __unused) { ulwp_t *self = curthread; __cleanup_t **headp = &self->ul_clnup_hdr; diff --git a/usr/src/lib/libc/amd64/unwind/unwind.c b/usr/src/lib/libc/amd64/unwind/unwind.c index 810a385031..c16dbd4388 100644 --- a/usr/src/lib/libc/amd64/unwind/unwind.c +++ b/usr/src/lib/libc/amd64/unwind/unwind.c @@ -170,10 +170,11 @@ ctx_who(struct _Unwind_Context *ctx) return (ctx->pfn); } -/* ARGSUSED */ _Unwind_Reason_Code -_Unw_very_boring_personality(int version, int actions, uint64_t exclass, - struct _Unwind_Exception *exception_object, struct _Unwind_Context *ctx) +_Unw_very_boring_personality(int version __unused, int actions __unused, + uint64_t exclass __unused, + struct _Unwind_Exception *exception_object __unused, + struct _Unwind_Context *ctx) { _Unwind_Reason_Code res = _URC_CONTINUE_UNWIND; uint64_t fp; @@ -454,7 +455,6 @@ _Unwind_ForcedUnwind(struct _Unwind_Exception *exception_object, void _Unwind_Resume(struct _Unwind_Exception *exception_object) { - struct _Unwind_Context context; struct _Unwind_Context *ctx = &context; diff --git a/usr/src/lib/libc/i386/gen/sync_instruction_memory.c b/usr/src/lib/libc/i386/gen/sync_instruction_memory.c index 8122d79879..662d3a1daa 100644 --- a/usr/src/lib/libc/i386/gen/sync_instruction_memory.c +++ b/usr/src/lib/libc/i386/gen/sync_instruction_memory.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/asm_linkage.h> /* @@ -35,8 +33,7 @@ * This is a no-op on x86 because it has a uniform cache. */ -/* ARGSUSED */ void -sync_instruction_memory(caddr_t addr, int len) +sync_instruction_memory(caddr_t addr __unused, int len __unused) { } diff --git a/usr/src/lib/libc/i386/sys/gettimeofday.c b/usr/src/lib/libc/i386/sys/gettimeofday.c index a4c62aeb68..69e654ccc3 100644 --- a/usr/src/lib/libc/i386/sys/gettimeofday.c +++ b/usr/src/lib/libc/i386/sys/gettimeofday.c @@ -22,7 +22,7 @@ extern int __clock_gettime_sys(clockid_t, timespec_t *); int -gettimeofday(struct timeval *tv, void *tz) +gettimeofday(struct timeval *tv, void *tz __unused) { comm_page_t *cp = (comm_page_t *)__uberdata.ub_comm_page; diff --git a/usr/src/lib/libc/port/aio/aio.c b/usr/src/lib/libc/port/aio/aio.c index 1ed8cf3438..945cd03db3 100644 --- a/usr/src/lib/libc/port/aio/aio.c +++ b/usr/src/lib/libc/port/aio/aio.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "lint.h" #include "thr_uberdata.h" #include "asyncio.h" @@ -495,9 +493,8 @@ aiocancel(aio_result_t *resultp) return (ret); } -/* ARGSUSED */ static void -_aiowait_cleanup(void *arg) +_aiowait_cleanup(void *arg __unused) { sig_mutex_lock(&__aio_mutex); _aiowait_flag--; @@ -974,7 +971,7 @@ _aio_create_worker(aio_req_t *reqp, int mode) * b) request is in progress (AIO_REQ_INPROGRESS) : * - this function first allow the cancellation of the running * request with the flag "work_cancel_flg=1" - * see _aio_req_get() -> _aio_cancel_on() + * see _aio_req_get() -> _aio_cancel_on() * During this phase, it is allowed to interrupt the worker * thread running the request (this thread) using the SIGAIOCANCEL * signal. diff --git a/usr/src/lib/libc/port/aio/posix_aio.c b/usr/src/lib/libc/port/aio/posix_aio.c index f1f23ffa62..48b5f620e2 100644 --- a/usr/src/lib/libc/port/aio/posix_aio.c +++ b/usr/src/lib/libc/port/aio/posix_aio.c @@ -120,18 +120,18 @@ _lio_listio_cleanup(aio_lio_t *head) int lio_listio(int mode, aiocb_t *_RESTRICT_KYWD const *_RESTRICT_KYWD list, - int nent, struct sigevent *_RESTRICT_KYWD sigevp) + int nent, struct sigevent *_RESTRICT_KYWD sigevp) { - int aio_ufs = 0; - int oerrno = 0; + int aio_ufs = 0; + int oerrno = 0; aio_lio_t *head = NULL; aiocb_t *aiocbp; int state = 0; - int EIOflg = 0; - int rw; + int EIOflg = 0; + int rw; int do_kaio = 0; - int error; - int i; + int error; + int i; if (!_kaio_ok) _kaio_init(); @@ -815,8 +815,8 @@ aio_fsync(int op, aiocb_t *aiocbp) /* * re-use aio_offset as the op field. - * O_DSYNC - fdatasync() - * O_SYNC - fsync() + * O_DSYNC - fdatasync() + * O_SYNC - fsync() */ aiocbp->aio_offset = op; aiocbp->aio_lio_opcode = AIOFSYNC; @@ -902,9 +902,8 @@ aio_cancel(int fd, aiocb_t *aiocbp) /* * __aio_waitn() cancellation handler. */ -/* ARGSUSED */ static void -_aio_waitn_cleanup(void *arg) +_aio_waitn_cleanup(void *arg __unused) { ASSERT(MUTEX_HELD(&__aio_mutex)); @@ -1198,7 +1197,7 @@ out: int aio_waitn(aiocb_t *list[], uint_t nent, uint_t *nwait, - const timespec_t *timeout) + const timespec_t *timeout) { return (__aio_waitn((void **)list, nent, nwait, timeout)); } @@ -1243,8 +1242,8 @@ _aio_waitn_wakeup(void) /* * timedwait values : - * AIO_TIMEOUT_POLL : polling - * AIO_TIMEOUT_WAIT : timeout + * AIO_TIMEOUT_POLL : polling + * AIO_TIMEOUT_WAIT : timeout * AIO_TIMEOUT_INDEF : wait indefinitely */ static int @@ -1317,18 +1316,18 @@ aio_write64(aiocb64_t *aiocbp) int lio_listio64(int mode, aiocb64_t *_RESTRICT_KYWD const *_RESTRICT_KYWD list, - int nent, struct sigevent *_RESTRICT_KYWD sigevp) + int nent, struct sigevent *_RESTRICT_KYWD sigevp) { - int aio_ufs = 0; - int oerrno = 0; + int aio_ufs = 0; + int oerrno = 0; aio_lio_t *head = NULL; aiocb64_t *aiocbp; int state = 0; - int EIOflg = 0; - int rw; + int EIOflg = 0; + int rw; int do_kaio = 0; - int error; - int i; + int error; + int i; if (!_kaio_ok) _kaio_init(); @@ -1673,8 +1672,8 @@ aio_fsync64(int op, aiocb64_t *aiocbp) /* * re-use aio_offset as the op field. - * O_DSYNC - fdatasync() - * O_SYNC - fsync() + * O_DSYNC - fdatasync() + * O_SYNC - fsync() */ aiocbp->aio_offset = op; aiocbp->aio_lio_opcode = AIOFSYNC; @@ -1759,7 +1758,7 @@ aio_cancel64(int fd, aiocb64_t *aiocbp) int aio_waitn64(aiocb64_t *list[], uint_t nent, uint_t *nwait, - const timespec_t *timeout) + const timespec_t *timeout) { return (__aio_waitn((void **)list, nent, nwait, timeout)); } diff --git a/usr/src/lib/libc/port/gen/_xftw.c b/usr/src/lib/libc/port/gen/_xftw.c index 681b6f20ca..b6d32eebd4 100644 --- a/usr/src/lib/libc/port/gen/_xftw.c +++ b/usr/src/lib/libc/port/gen/_xftw.c @@ -25,7 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ /* * _xftw - file tree walk the uses expanded stat structure @@ -114,10 +114,9 @@ static const char *get_unrooted(const char *); static int fwalk(const char *, int (*)(const char *, const struct stat *, int), int, struct Var *); -/*ARGSUSED*/ int -_xftw(int ver, const char *path, - int (*fn)(const char *, const struct stat *, int), int depth) +_xftw(int ver __unused, const char *path, + int (*fn)(const char *, const struct stat *, int), int depth) { struct Var var; int rc; @@ -133,7 +132,7 @@ _xftw(int ver, const char *path, */ static int fwalk(const char *path, int (*fn)(const char *, const struct stat *, int), - int depth, struct Var *vp) + int depth, struct Var *vp) { size_t n; int rc; @@ -287,23 +286,23 @@ nocdopendir(const char *path, struct Var *vp) return (NULL); } if ((token = strtok_r(dirp, "/", &ptr)) != NULL) { - if ((fd = openat(AT_FDCWD, dirp, O_RDONLY)) < 0) { - (void) free(dirp); - errno = ENAMETOOLONG; - return (NULL); - } - while ((token = strtok_r(NULL, "/", &ptr)) != NULL) { - if ((cfd = openat(fd, token, O_RDONLY)) < 0) { - (void) close(fd); - (void) free(dirp); - errno = ENAMETOOLONG; - return (NULL); + if ((fd = openat(AT_FDCWD, dirp, O_RDONLY)) < 0) { + (void) free(dirp); + errno = ENAMETOOLONG; + return (NULL); } - (void) close(fd); - fd = cfd; - } - (void) free(dirp); - return (fdopendir(fd)); + while ((token = strtok_r(NULL, "/", &ptr)) != NULL) { + if ((cfd = openat(fd, token, O_RDONLY)) < 0) { + (void) close(fd); + (void) free(dirp); + errno = ENAMETOOLONG; + return (NULL); + } + (void) close(fd); + fd = cfd; + } + (void) free(dirp); + return (fdopendir(fd)); } (void) free(dirp); errno = ENAMETOOLONG; @@ -334,29 +333,29 @@ nocdstat(const char *path, struct stat *statp, struct Var *vp, int sym) return (-1); } if ((token = strtok_r(dirp, "/", &ptr)) != NULL) { - if ((fd = openat(AT_FDCWD, dirp, O_RDONLY)) < 0) { - (void) free(dirp); - errno = ENAMETOOLONG; - return (-1); - } - unrootp = get_unrooted(path); - while (((token = strtok_r(NULL, "/", &ptr)) != NULL) && - (strcmp(token, unrootp) != 0)) { - if ((cfd = openat(fd, token, O_RDONLY)) < 0) { - (void) close(fd); + if ((fd = openat(AT_FDCWD, dirp, O_RDONLY)) < 0) { (void) free(dirp); errno = ENAMETOOLONG; - return (0); - } - (void) close(fd); - fd = cfd; - } - (void) free(dirp); - rc = fstatat(fd, unrootp, statp, sym); - save_err = errno; - (void) close(fd); - errno = save_err; - return (rc); + return (-1); + } + unrootp = get_unrooted(path); + while (((token = strtok_r(NULL, "/", &ptr)) != NULL) && + (strcmp(token, unrootp) != 0)) { + if ((cfd = openat(fd, token, O_RDONLY)) < 0) { + (void) close(fd); + (void) free(dirp); + errno = ENAMETOOLONG; + return (0); + } + (void) close(fd); + fd = cfd; + } + (void) free(dirp); + rc = fstatat(fd, unrootp, statp, sym); + save_err = errno; + (void) close(fd); + errno = save_err; + return (rc); } (void) free(dirp); errno = ENAMETOOLONG; diff --git a/usr/src/lib/libc/port/gen/cfree.c b/usr/src/lib/libc/port/gen/cfree.c index d113695cfb..e38ec0c3b4 100644 --- a/usr/src/lib/libc/port/gen/cfree.c +++ b/usr/src/lib/libc/port/gen/cfree.c @@ -25,9 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* All Rights Reserved */ /* * cfree - clear memory block @@ -37,9 +35,8 @@ #include <sys/types.h> #include <stdlib.h> -/* ARGSUSED1 */ void -cfree(void *p, size_t num, size_t size) +cfree(void *p, size_t num __unused, size_t size __unused) { free(p); } diff --git a/usr/src/lib/libc/port/gen/crypt.c b/usr/src/lib/libc/port/gen/crypt.c index 016da3202a..1da770529d 100644 --- a/usr/src/lib/libc/port/gen/crypt.c +++ b/usr/src/lib/libc/port/gen/crypt.c @@ -775,13 +775,12 @@ isa_path(const char *path) } -/*ARGSUSED*/ static char * _unix_crypt_gensalt(char *gsbuffer, - size_t gsbufflen, - const char *oldpuresalt, - const struct passwd *userinfo, - const char *argv[]) + size_t gsbufflen __unused, + const char *oldpuresalt __unused, + const struct passwd *userinfo __unused, + const char *argv[] __unused) { static const char saltchars[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -1014,9 +1013,8 @@ static char f[32]; static char preS[48]; -/*ARGSUSED*/ static void -unlocked_encrypt(char *block, int fake) +unlocked_encrypt(char *block, int fake __unused) { int i; int t, j, k; diff --git a/usr/src/lib/libc/port/gen/fts.c b/usr/src/lib/libc/port/gen/fts.c index 17a955c1e9..744bbcf717 100644 --- a/usr/src/lib/libc/port/gen/fts.c +++ b/usr/src/lib/libc/port/gen/fts.c @@ -458,9 +458,8 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent); * semantics to fts using fts_set. An error return is allowed for similar * reasons. */ -/*ARGSUSED*/ int -fts_set(FTS *sp, FTSENT *p, int instr) +fts_set(FTS *sp __unused, FTSENT *p, int instr) { if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW && instr != FTS_NOINSTR && instr != FTS_SKIP) { diff --git a/usr/src/lib/libc/port/gen/getmntent.c b/usr/src/lib/libc/port/gen/getmntent.c index ef63aacf85..a8e161f5dc 100644 --- a/usr/src/lib/libc/port/gen/getmntent.c +++ b/usr/src/lib/libc/port/gen/getmntent.c @@ -24,7 +24,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ #include "lint.h" #include <mtlib.h> @@ -274,9 +274,8 @@ getmntent(FILE *fp, struct mnttab *mp) return (getmntent_common(fp, (struct extmnttab *)mp, MNTIOC_GETMNTENT)); } -/*ARGSUSED*/ int -getextmntent(FILE *fp, struct extmnttab *emp, size_t len) +getextmntent(FILE *fp, struct extmnttab *emp, size_t len __unused) { return (getmntent_common(fp, emp, MNTIOC_GETEXTMNTENT)); } diff --git a/usr/src/lib/libc/port/gen/getopt_long.c b/usr/src/lib/libc/port/gen/getopt_long.c index 68cc6c3a82..02dabab4d4 100644 --- a/usr/src/lib/libc/port/gen/getopt_long.c +++ b/usr/src/lib/libc/port/gen/getopt_long.c @@ -80,7 +80,7 @@ static int optreset = 0; /* keep track of first entry to getopt() */ #define PRINT_ERROR ((opterr) && (*options != ':')) -#define FLAG_IS_SET(flag) ((flags & flag) != 0) /* is flag turned on? */ +#define FLAG_IS_SET(flag) ((flags & flag) != 0) /* is flag turned on? */ /* Determine if an argument is required for this long option */ #define LONGOPT_REQUIRES_ARG(longopt) \ @@ -93,14 +93,14 @@ static int optreset = 0; /* keep track of first entry to getopt() */ #define FLAG_LONGONLY 0x04 /* operate as getopt_long_only() */ #define FLAG_OPTIONAL_ARGS 0x08 /* allow optional arguments to options */ #define FLAG_REQUIRE_EQUIVALENTS 0x10 /* require short<->long equivalents */ -#define FLAG_ABBREV 0x20 /* long option abbreviation allowed. */ -#define FLAG_W_SEMICOLON 0x40 /* Support for W; in optstring */ +#define FLAG_ABBREV 0x20 /* long option abbreviation allowed. */ +#define FLAG_W_SEMICOLON 0x40 /* Support for W; in optstring */ #define FLAG_PLUS_DASH_START 0x80 /* leading '+' or '-' in optstring */ /* return values */ #define BADCH (int)'?' #define BADARG ((*options == ':') ? (int)':' : (int)'?') -#define INORDER (int)1 +#define INORDER (int)1 #define EMSG "" @@ -128,7 +128,8 @@ static int nonopt_end = -1; /* first option after non options (for permute) */ * being passed to warnx_getopt(). */ static void -warnx_getopt(const char *argv0, const char *msg, const char *arg) { +warnx_getopt(const char *argv0, const char *msg, const char *arg) +{ char errbuf[256]; (void) snprintf(errbuf, sizeof (errbuf), msg, argv0, arg); (void) write(2, errbuf, strlen(errbuf)); @@ -139,7 +140,8 @@ warnx_getopt(const char *argv0, const char *msg, const char *arg) { * Generalized error message output. */ static void -warnxchar(const char *argv0, const char *msg, const char c) { +warnxchar(const char *argv0, const char *msg, const char c) +{ char charbuf[2]; charbuf[0] = c; charbuf[1] = '\0'; @@ -150,7 +152,8 @@ warnxchar(const char *argv0, const char *msg, const char c) { * Generalized error message output. */ static void -warnxlen(const char *argv0, const char *msg, int argLen, const char *arg) { +warnxlen(const char *argv0, const char *msg, int argLen, const char *arg) +{ char argbuf[256]; (void) strncpy(argbuf, arg, argLen); argbuf[argLen < (sizeof (argbuf)-1)? argLen:(sizeof (argbuf)-1)] = '\0'; @@ -182,7 +185,7 @@ gcd(int a, int b) */ static void permute_args(int panonopt_start, int panonopt_end, int opt_end, - char * const *nargv) + char * const *nargv) { int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; char *swap; @@ -230,12 +233,9 @@ permute_args(int panonopt_start, int panonopt_end, int opt_end, * Returns >= 0 on success */ static int -/* LINTED: argument unused in function: nargc */ -verify_short_long_equivalents(int nargc, - char *const *nargv, - const char *options, - const struct option *long_options, - uint_t flags) { +verify_short_long_equivalents(int nargc __unused, char *const *nargv, + const char *options, const struct option *long_options, uint_t flags) +{ int short_i = 0; int long_i = 0; int equivFound = 0; @@ -252,7 +252,7 @@ verify_short_long_equivalents(int nargc, continue; } if (FLAG_IS_SET(FLAG_W_SEMICOLON) && - (ch == 'W') && (options[short_i+1] == ';')) { + (ch == 'W') && (options[short_i+1] == ';')) { /* W; is a special case */ ++short_i; continue; @@ -261,16 +261,16 @@ verify_short_long_equivalents(int nargc, equivFound = 0; if (long_options != NULL) { for (long_i = 0; ((!equivFound) && - (long_options[long_i].name != NULL)); - ++long_i) { + (long_options[long_i].name != NULL)); + ++long_i) { equivFound = (ch == long_options[long_i].val); } } if ((!equivFound) && (PRINT_ERROR)) { warnxchar(nargv[0], - _libc_gettext( - "%s: equivalent long option required -- %s"), - ch); + _libc_gettext( + "%s: equivalent long option required -- %s"), + ch); } } /* short_i */ @@ -280,17 +280,17 @@ verify_short_long_equivalents(int nargc, */ if (equivFound && (long_options != NULL)) { for (long_i = 0; (equivFound && - (long_options[long_i].name != NULL)); - ++long_i) { + (long_options[long_i].name != NULL)); + ++long_i) { equivFound = ((long_options[long_i].val != 0) && - (strchr(options, long_options[long_i].val) - != NULL)); + (strchr(options, long_options[long_i].val) + != NULL)); if ((!equivFound) && (PRINT_ERROR)) { warnx_getopt(nargv[0], - _libc_gettext( - "%s: equivalent short option required -- %s"), - long_options[long_i].name); + _libc_gettext("%s: equivalent short " + "option required -- %s"), + long_options[long_i].name); } } /* for long_i */ } @@ -305,8 +305,8 @@ verify_short_long_equivalents(int nargc, */ static int parse_long_options(int nargc, char * const *nargv, const char *options, - const struct option *long_options, int *idx, int short_too, - uint_t flags) + const struct option *long_options, int *idx, int short_too, + uint_t flags) { char *current_argv = NULL; char *argv_equal_ptr = NULL; @@ -454,7 +454,7 @@ parse_long_options(int nargc, char * const *nargv, const char *options, */ static int getopt_internal(int nargc, char * const *nargv, const char *options, - const struct option *long_options, int *idx, uint_t flags) + const struct option *long_options, int *idx, uint_t flags) { char *oli; /* option letter list index */ int optchar, short_too; @@ -718,8 +718,8 @@ start: */ int getopt_long(int nargc, char *const *nargv, - const char *optstring, - const struct option *long_options, int *long_index) + const char *optstring, + const struct option *long_options, int *long_index) { return (getopt_internal( @@ -739,8 +739,8 @@ getopt_long(int nargc, char *const *nargv, */ int getopt_long_only(int nargc, char *const *nargv, - const char *optstring, - const struct option *long_options, int *long_index) + const char *optstring, + const struct option *long_options, int *long_index) { return (getopt_internal( @@ -756,7 +756,7 @@ getopt_long_only(int nargc, char *const *nargv, /* * getopt_clip() -- * Parse argc/argv argument vector, requiring compliance with - * Sun's CLIP specification (11/12/02) + * Sun's CLIP specification (11/12/02) * * o Does not allow arguments to be optional (optional_argument is * treated as required_argument). @@ -778,9 +778,8 @@ getopt_long_only(int nargc, char *const *nargv, * treated as if it began after the + or - . */ int -getopt_clip(int nargc, char *const *nargv, - const char *optstring, - const struct option *long_options, int *long_index) +getopt_clip(int nargc, char *const *nargv, const char *optstring, + const struct option *long_options, int *long_index) { return getopt_internal( nargc, nargv, optstring, long_options, long_index, diff --git a/usr/src/lib/libc/port/gen/iconv.c b/usr/src/lib/libc/port/gen/iconv.c index 622e26da31..721cfe02f0 100644 --- a/usr/src/lib/libc/port/gen/iconv.c +++ b/usr/src/lib/libc/port/gen/iconv.c @@ -45,7 +45,7 @@ static iconv_p iconv_open_all(const char *, const char *, char *); static iconv_p iconv_open_private(const char *, const char *); static iconv_p iconv_search_alias(const char *, const char *, char *); static size_t passthru_icv_iconv(iconv_t, const char **, size_t *, char **, - size_t *); + size_t *); static void passthru_icv_close(iconv_t); #define PASSTHRU_MAGIC_NUMBER (0x53756e) @@ -153,7 +153,7 @@ static size_t search_alias(char **paddr, size_t size, const char *variant) { char *addr = *paddr; - char *p, *sp, *q; + char *p, *sp, *q; size_t var_len, can_len; var_len = strlen(variant); @@ -425,14 +425,13 @@ iconv_close(iconv_t cd) * we supply a dummy passthru_icv_close() that will just return. */ static void -/*LINTED E_FUNC_ARG_UNUSED*/ -passthru_icv_close(iconv_t cd) +passthru_icv_close(iconv_t cd __unused) { } size_t iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft) + char **outbuf, size_t *outbytesleft) { /* check if cd is valid */ if (cd == NULL || cd == (iconv_t)-1) { @@ -447,7 +446,7 @@ iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, static size_t passthru_icv_iconv(iconv_t cd, const char **inbuf, size_t *inbufleft, - char **outbuf, size_t *outbufleft) + char **outbuf, size_t *outbufleft) { size_t ibl; size_t obl; diff --git a/usr/src/lib/libc/port/gen/klpdlib.c b/usr/src/lib/libc/port/gen/klpdlib.c index 4b1042bcc3..3afb6f162a 100644 --- a/usr/src/lib/libc/port/gen/klpdlib.c +++ b/usr/src/lib/libc/port/gen/klpdlib.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "lint.h" #include "priv_private.h" #include "mtlib.h" @@ -56,10 +54,9 @@ typedef struct klpd_ctxt { int kc_type; } klpd_ctxt_t; -/* ARGSUSED */ static void -klpd_door_callback(void *kd_cookie, char *argp, size_t arg_size, - door_desc_t *dp, uint_t ndesc) +klpd_door_callback(void *kd_cookie, char *argp, size_t arg_size __unused, + door_desc_t *dp __unused, uint_t ndesc __unused) { klpd_data_t *p = kd_cookie; int res; @@ -210,9 +207,8 @@ klpd_getport(void *context, int *proto) return (p->kc_int); } -/*ARGSUSED*/ int -klpd_getucred(ucred_t **uc, void *context) +klpd_getucred(ucred_t **uc, void *context __unused) { return (door_ucred(uc)); } diff --git a/usr/src/lib/libc/port/gen/nftw.c b/usr/src/lib/libc/port/gen/nftw.c index 2deff1dbd4..f07f9a9f94 100644 --- a/usr/src/lib/libc/port/gen/nftw.c +++ b/usr/src/lib/libc/port/gen/nftw.c @@ -25,9 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* All Rights Reserved */ /* * nftw - new file tree walk @@ -608,9 +606,9 @@ done: /* * Get stat info on path when FTW_CHDIR is set. */ -/*ARGSUSED1*/ static int -cdstat(const char *path, struct stat *statp, struct Save *lp, int flags) +cdstat(const char *path, struct stat *statp, struct Save *lp __unused, + int flags) { return (fstatat(AT_FDCWD, path, statp, flags)); } @@ -618,9 +616,9 @@ cdstat(const char *path, struct stat *statp, struct Save *lp, int flags) /* * Get lstat info on path when FTW_CHDIR is set. */ -/*ARGSUSED1*/ static int -cdlstat(const char *path, struct stat *statp, struct Save *lp, int flags) +cdlstat(const char *path, struct stat *statp, struct Save *lp __unused, + int flags) { return (fstatat(AT_FDCWD, path, statp, flags | AT_SYMLINK_NOFOLLOW)); diff --git a/usr/src/lib/libc/port/gen/nss_common.c b/usr/src/lib/libc/port/gen/nss_common.c index 20740d73c7..b92e76abfc 100644 --- a/usr/src/lib/libc/port/gen/nss_common.c +++ b/usr/src/lib/libc/port/gen/nss_common.c @@ -249,14 +249,14 @@ static struct option nis_options[] = { */ typedef struct nss_cfgparam { - char *name; + char *name; mutex_t *lock; void *buffer; size_t length; } nss_cfgparam_t; typedef struct nss_cfglist { - char *name; + char *name; nss_cfgparam_t *list; int count; int max; @@ -562,7 +562,7 @@ nss_status_t nss_config(nss_config_t **plist, int cnt) { nss_config_t *next; - int i; + int i; /* interface is only available to nscd */ if (_nsc_proc_is_cache() <= 0) { @@ -973,7 +973,6 @@ _nss_src_state_destr(struct nss_src_state *src, int max_dormant) void _nss_db_state_destr(struct nss_db_state *s) { - if (s == NULL) return; @@ -1282,16 +1281,10 @@ struct nss_getent_context { nss_db_params_t param; }; -static void nss_setent_u(nss_db_root_t *, - nss_db_initf_t, - nss_getent_t *); -static nss_status_t nss_getent_u(nss_db_root_t *, - nss_db_initf_t, - nss_getent_t *, - void *); -static void nss_endent_u(nss_db_root_t *, - nss_db_initf_t, - nss_getent_t *); +static void nss_setent_u(nss_db_root_t *, nss_db_initf_t, nss_getent_t *); +static nss_status_t nss_getent_u(nss_db_root_t *, nss_db_initf_t, + nss_getent_t *, void *); +static void nss_endent_u(nss_db_root_t *, nss_db_initf_t, nss_getent_t *); void nss_setent(nss_db_root_t *rootp, nss_db_initf_t initf, nss_getent_t *contextpp) @@ -1647,9 +1640,8 @@ nss_pack_dbd(void *buffer, size_t bufsize, nss_db_params_t *p, size_t *poff) * Return: NSS_SUCCESS (OK to proceed), NSS_ERROR, NSS_NOTFOUND */ -/*ARGSUSED*/ nss_status_t -nss_pack(void *buffer, size_t bufsize, nss_db_root_t *rootp, +nss_pack(void *buffer, size_t bufsize, nss_db_root_t *rootp __unused, nss_db_initf_t initf, int search_fnum, void *search_args) { nss_pheader_t *pbuf = (nss_pheader_t *)buffer; @@ -1755,9 +1747,8 @@ nss_pack(void *buffer, size_t bufsize, nss_db_root_t *rootp, * Return: NSS_SUCCESS (OK to proceed), NSS_ERROR, NSS_NOTFOUND */ -/*ARGSUSED*/ nss_status_t -nss_pack_ent(void *buffer, size_t bufsize, nss_db_root_t *rootp, +nss_pack_ent(void *buffer, size_t bufsize, nss_db_root_t *rootp __unused, nss_db_initf_t initf, nss_getent_t *contextpp) { nss_pheader_t *pbuf = (nss_pheader_t *)buffer; @@ -1829,10 +1820,9 @@ nss_pack_ent(void *buffer, size_t bufsize, nss_db_root_t *rootp, * quantities. Store in an int array... Assume gid's are <= 32 bits... */ -/*ARGSUSED*/ nss_status_t -nss_unpack(void *buffer, size_t bufsize, nss_db_root_t *rootp, - nss_db_initf_t initf, int search_fnum, void *search_args) +nss_unpack(void *buffer, size_t bufsize __unused, nss_db_root_t *rootp __unused, + nss_db_initf_t initf __unused, int search_fnum, void *search_args) { nss_pheader_t *pbuf = (nss_pheader_t *)buffer; nss_XbyY_args_t *in = (nss_XbyY_args_t *)search_args; @@ -1930,10 +1920,10 @@ nss_unpack(void *buffer, size_t bufsize, nss_db_root_t *rootp, * Return: status, errnos, cookie info and results from requested operation. */ -/*ARGSUSED*/ nss_status_t -nss_unpack_ent(void *buffer, size_t bufsize, nss_db_root_t *rootp, - nss_db_initf_t initf, nss_getent_t *contextpp, void *args) +nss_unpack_ent(void *buffer, size_t bufsize __unused, + nss_db_root_t *rootp __unused, nss_db_initf_t initf __unused, + nss_getent_t *contextpp, void *args) { nss_pheader_t *pbuf = (nss_pheader_t *)buffer; nss_XbyY_args_t *in = (nss_XbyY_args_t *)args; diff --git a/usr/src/lib/libc/port/gen/nss_dbdefs.c b/usr/src/lib/libc/port/gen/nss_dbdefs.c index b914c1d313..cf6591db97 100644 --- a/usr/src/lib/libc/port/gen/nss_dbdefs.c +++ b/usr/src/lib/libc/port/gen/nss_dbdefs.c @@ -129,19 +129,19 @@ _nss_XbyY_fgets(FILE *f, nss_XbyY_args_t *b) * CAUTION: (instr, instr+lenstr) and (buffer, buffer+buflen) are * non-intersecting memory areas. Since this is an internal interface, * we should be able to live with that. + * + * "instr" is the beginning of the aliases string + * "buffer" has the return val for success + * "buflen" is the length of the buffer available for aliases */ char ** _nss_netdb_aliases(const char *instr, int lenstr, char *buffer, int buflen) - /* "instr" is the beginning of the aliases string */ - /* "buffer" has the return val for success */ - /* "buflen" is the length of the buffer available for aliases */ { /* * Build the alias-list in the start of the buffer, and copy * the strings to the end of the buffer. */ - const char - *instr_limit = instr + lenstr; + const char *instr_limit = instr + lenstr; char *copyptr = buffer + buflen; char **aliasp = (char **)ROUND_UP(buffer, sizeof (*aliasp)); char **alias_start = aliasp; @@ -287,7 +287,7 @@ static getXbyY_to_dbop_t getXbyY_to_dbop[] = { NSS_MK_GETXYDBOPC(SERVICES, BYNAME, "services", "str2servent", "s"), NSS_MK_GETXYDBOPC(SERVICES, BYPORT, "services", "str2servent", "S"), NSS_MK_GETXYDBOPB(SHADOW, PASSWD, PASSWD_BYNAME, "shadow", - "str2spwd", "n"), + "str2spwd", "n"), NSS_MK_GETXYDBOPC(TSOL_RH, BYADDR, "tsol_rh", "str_to_rhstr", "h"), NSS_MK_GETXYDBOPC(TSOL_TP, BYNAME, "tsol_tp", "str_to_tpstr", "n"), NSS_MK_GETXYDBOPC(TSOL_ZC, BYNAME, "tsol_zc", "str_to_zcstr", "n"), @@ -386,14 +386,13 @@ nss_dbop_search(const char *name, uint32_t dbop) * setnetgr_args T */ -/*ARGSUSED*/ static nss_status_t nss_pack_key2str(void *buffer, size_t length, nss_XbyY_args_t *arg, - const char *dbname, int dbop, size_t *rlen, const char *typestr) + const char *dbname, int dbop __unused, size_t *rlen, const char *typestr) { int i, j; size_t len, len2, len3, len4, len5, slop; - nssuint_t *uptr, offv, offc; + nssuint_t *uptr, offv, offc; struct nss_setnetgrent_args *sng; struct nss_innetgr_args *ing; struct nss_groupsbymem *gbm; @@ -744,7 +743,7 @@ nss_pack_key2str(void *buffer, size_t length, nss_XbyY_args_t *arg, nss_status_t nss_default_key2str(void *buffer, size_t length, nss_XbyY_args_t *arg, - const char *dbname, int dbop, size_t *rlen) + const char *dbname, int dbop, size_t *rlen) { int index; @@ -764,12 +763,11 @@ nss_default_key2str(void *buffer, size_t length, nss_XbyY_args_t *arg, dbop, rlen, getXbyY_to_dbop[index].tostr)); } -/*ARGSUSED*/ void -nss_packed_set_status(void *buffer, size_t length, nss_status_t status, - nss_XbyY_args_t *arg) +nss_packed_set_status(void *buffer, size_t length __unused, nss_status_t status, + nss_XbyY_args_t *arg) { - nss_pheader_t *pbuf = (nss_pheader_t *)buffer; + nss_pheader_t *pbuf = (nss_pheader_t *)buffer; nss_dbd_t *pdbd; char *dbn; @@ -866,14 +864,13 @@ nss_packed_set_status(void *buffer, size_t length, nss_status_t status, * Assumes arguments are all valid */ -/*ARGSUSED*/ static nss_status_t -nss_upack_key2arg(void *buffer, size_t length, char **dbname, - int *dbop, nss_XbyY_args_t *arg, int index) +nss_upack_key2arg(void *buffer, size_t length __unused, char **dbname __unused, + int *dbop __unused, nss_XbyY_args_t *arg, int index) { - nss_pheader_t *pbuf = (nss_pheader_t *)buffer; + nss_pheader_t *pbuf = (nss_pheader_t *)buffer; const char *strtype = NULL; - nssuint_t off, *uptr, keysize; + nssuint_t off, *uptr, keysize; size_t len, slop; int i, j; char **cv, *bptr; @@ -1116,11 +1113,11 @@ nss_pinit_funcs(int index, nss_db_initf_t *initf, nss_str2ent_t *s2e) nss_status_t nss_packed_getkey(void *buffer, size_t length, char **dbname, - int *dbop, nss_XbyY_args_t *arg) + int *dbop, nss_XbyY_args_t *arg) { - nss_pheader_t *pbuf = (nss_pheader_t *)buffer; + nss_pheader_t *pbuf = (nss_pheader_t *)buffer; nss_dbd_t *pdbd; - nssuint_t off, dbdsize; + nssuint_t off, dbdsize; int index; if (buffer == NULL || length == 0 || dbop == NULL || @@ -1151,15 +1148,13 @@ nss_packed_getkey(void *buffer, size_t length, char **dbname, * store the entry in the buffer we were passed by the caller. */ -/*ARGSUSED*/ static int str2packent( const char *instr, int lenstr, - void *ent, /* really (char *) */ + void *ent __unused, /* really (char *) */ char *buffer, - int buflen -) + int buflen) { if (buflen <= lenstr) { /* not enough buffer */ return (NSS_STR_PARSE_ERANGE); @@ -1174,12 +1169,12 @@ str2packent( * Initialize db_root, initf, dbop and arg from a packed buffer */ -/*ARGSUSED*/ nss_status_t -nss_packed_arg_init(void *buffer, size_t length, nss_db_root_t *db_root, - nss_db_initf_t *initf, int *dbop, nss_XbyY_args_t *arg) +nss_packed_arg_init(void *buffer, size_t length, + nss_db_root_t *db_root __unused, + nss_db_initf_t *initf, int *dbop, nss_XbyY_args_t *arg) { - nss_pheader_t *pbuf = (nss_pheader_t *)buffer; + nss_pheader_t *pbuf = (nss_pheader_t *)buffer; nss_str2ent_t s2e = str2packent; nss_str2ent_t real_s2e = NULL; nss_dbd_t *pdbd; @@ -1249,13 +1244,13 @@ nss_packed_arg_init(void *buffer, size_t length, nss_db_root_t *db_root, * Initialize db_root, initf, dbop, contextp and arg from a packed buffer */ -/*ARGSUSED*/ nss_status_t -nss_packed_context_init(void *buffer, size_t length, nss_db_root_t *db_root, - nss_db_initf_t *initf, nss_getent_t **contextp, - nss_XbyY_args_t *arg) +nss_packed_context_init(void *buffer, size_t length __unused, + nss_db_root_t *db_root __unused, + nss_db_initf_t *initf __unused, nss_getent_t **contextp __unused, + nss_XbyY_args_t *arg) { - nss_pheader_t *pbuf = (nss_pheader_t *)buffer; + nss_pheader_t *pbuf = (nss_pheader_t *)buffer; nss_str2ent_t s2e = str2packent; char *bptr; size_t len; diff --git a/usr/src/lib/libc/port/gen/nss_deffinder.c b/usr/src/lib/libc/port/gen/nss_deffinder.c index 8ba91e9592..b13d5419a2 100644 --- a/usr/src/lib/libc/port/gen/nss_deffinder.c +++ b/usr/src/lib/libc/port/gen/nss_deffinder.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Default backend-finder(s) for the name-service-switch routines. * At present there is a single finder that uses dlopen() to do its thing. @@ -59,10 +57,9 @@ static const char dlopen_format[] = NSS_DLOPEN_FORMAT; static const char dlsym_format [] = NSS_DLSYM_FORMAT; static const size_t format_maxlen = sizeof (dlsym_format) - 4; -/*ARGSUSED*/ static nss_backend_constr_t -SO_per_src_lookup(void *dummy, const char *db_name, const char *src_name, - void **delete_privp) +SO_per_src_lookup(void *dummy __unused, const char *db_name, + const char *src_name, void **delete_privp) { char *name; void *dlhandle; @@ -85,9 +82,8 @@ SO_per_src_lookup(void *dummy, const char *db_name, const char *src_name, return (res); } -/*ARGSUSED*/ static void -SO_per_src_delete(void *delete_priv, nss_backend_constr_t dummy) +SO_per_src_delete(void *delete_priv, nss_backend_constr_t dummy __unused) { (void) dlclose(delete_priv); } diff --git a/usr/src/lib/libc/port/gen/posix_fadvise.c b/usr/src/lib/libc/port/gen/posix_fadvise.c index a42d1a9e88..d1c6c5f796 100644 --- a/usr/src/lib/libc/port/gen/posix_fadvise.c +++ b/usr/src/lib/libc/port/gen/posix_fadvise.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "lint.h" #include <fcntl.h> #include <sys/types.h> @@ -44,9 +42,8 @@ * the kernel to optimize I/O operations based on the given advice. */ -/* ARGSUSED1 */ int -posix_fadvise(int fd, off_t offset, off_t len, int advice) +posix_fadvise(int fd, off_t offset __unused, off_t len, int advice) { struct stat64 statb; @@ -72,9 +69,8 @@ posix_fadvise(int fd, off_t offset, off_t len, int advice) #if !defined(_LP64) -/* ARGSUSED1 */ int -posix_fadvise64(int fd, off64_t offset, off64_t len, int advice) +posix_fadvise64(int fd, off64_t offset __unused, off64_t len, int advice) { struct stat64 statb; diff --git a/usr/src/lib/libc/port/gen/set_constraint_handler_s.c b/usr/src/lib/libc/port/gen/set_constraint_handler_s.c index 2261a8df0a..2301e4f608 100644 --- a/usr/src/lib/libc/port/gen/set_constraint_handler_s.c +++ b/usr/src/lib/libc/port/gen/set_constraint_handler_s.c @@ -70,18 +70,16 @@ set_constraint_handler_s(constraint_handler_t handler) return (ret); } -/*ARGSUSED*/ void abort_handler_s(const char *_RESTRICT_KYWD msg, - void *_RESTRICT_KYWD ptr, errno_t error) + void *_RESTRICT_KYWD ptr __unused, errno_t error __unused) { common_panic("abort_handler_s: ", msg); } -/*ARGSUSED*/ void -ignore_handler_s(const char *_RESTRICT_KYWD msg, - void *_RESTRICT_KYWD ptr, errno_t error) +ignore_handler_s(const char *_RESTRICT_KYWD msg __unused, + void *_RESTRICT_KYWD ptr __unused, errno_t error __unused) { } diff --git a/usr/src/lib/libc/port/gen/settimeofday.c b/usr/src/lib/libc/port/gen/settimeofday.c index 466933d7cc..04509e82cb 100644 --- a/usr/src/lib/libc/port/gen/settimeofday.c +++ b/usr/src/lib/libc/port/gen/settimeofday.c @@ -25,9 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* All Rights Reserved */ #include "lint.h" #include <sys/types.h> @@ -41,9 +39,8 @@ * Don't do anything with the timezone information. */ -/*ARGSUSED1*/ int -settimeofday(struct timeval *tp, void *tzp) +settimeofday(struct timeval *tp, void *tzp __unused) { time_t t; /* time in seconds */ diff --git a/usr/src/lib/libc/port/gen/walkstack.c b/usr/src/lib/libc/port/gen/walkstack.c index 85963f53ab..8471a13a5f 100644 --- a/usr/src/lib/libc/port/gen/walkstack.c +++ b/usr/src/lib/libc/port/gen/walkstack.c @@ -161,7 +161,6 @@ static int read_safe(int fd, struct frame *fp, struct frame **savefp, uintptr_t *savepc) { - uintptr_t newfp; if ((uintptr_t)fp & (sizeof (void *) - 1)) @@ -346,7 +345,6 @@ async_filenoprintf(int filenum, const char *format, ...) static int display_stack_info(uintptr_t pc, int signo, void *arg) { - char buffer[MAX_LINE]; char sigbuf[SIG2STR_MAX]; @@ -394,9 +392,8 @@ typedef struct backtrace { int bt_actcount; } backtrace_t; -/* ARGSUSED */ static int -callback(uintptr_t pc, int signo, void *arg) +callback(uintptr_t pc, int signo __unused, void *arg) { backtrace_t *bt = (backtrace_t *)arg; diff --git a/usr/src/lib/libc/port/i18n/wdresolve.c b/usr/src/lib/libc/port/i18n/wdresolve.c index 3e8402de94..bdf5284666 100644 --- a/usr/src/lib/libc/port/i18n/wdresolve.c +++ b/usr/src/lib/libc/port/i18n/wdresolve.c @@ -164,7 +164,6 @@ wdchkind_C(wchar_t wc) * strength of two characters represented by the first two arguments. * It returns -1 when either of the two character is not printable. */ -/*ARGSUSED*/ int wdbindf(wchar_t wc1, wchar_t wc2, int type) { @@ -181,9 +180,9 @@ wdbindf(wchar_t wc1, wchar_t wc2, int type) callout_lock_exit(); return (i); } -/*ARGSUSED*/ + static int -wdbindf_C(wchar_t wc1, wchar_t wc2, int type) +wdbindf_C(wchar_t wc1, wchar_t wc2, int type __unused) { if (csetlen(wc1) > 1 && csetlen(wc2) > 1) return (4); @@ -197,7 +196,6 @@ wdbindf_C(wchar_t wc1, wchar_t wc2, int type) * with the second argument, with. When either of the two character * is not printable it returns a pointer to a null wide character. */ -/*ARGSUSED*/ wchar_t * wddelim(wchar_t wc1, wchar_t wc2, int type) { @@ -214,9 +212,9 @@ wddelim(wchar_t wc1, wchar_t wc2, int type) callout_lock_exit(); return (i); } -/*ARGSUSED*/ + static wchar_t * -wddelim_C(wchar_t wc1, wchar_t wc2, int type) +wddelim_C(wchar_t wc1 __unused, wchar_t wc2 __unused, int type __unused) { return ((wchar_t *)L" "); } diff --git a/usr/src/lib/libc/port/locale/none.c b/usr/src/lib/libc/port/locale/none.c index 5eefc746aa..9ada4e0f3b 100644 --- a/usr/src/lib/libc/port/locale/none.c +++ b/usr/src/lib/libc/port/locale/none.c @@ -41,7 +41,6 @@ #include <stdlib.h> #include <string.h> #include <wchar.h> -#include <note.h> #include "mblocal.h" #include "lctype.h" @@ -60,10 +59,8 @@ _none_init(struct lc_ctype *lct) } int -__mbsinit_ascii(const mbstate_t *unused) +__mbsinit_ascii(const mbstate_t *unused __unused) { - _NOTE(ARGUNUSED(unused)); - /* * Encoding is not state dependent - we are always in the * initial state. @@ -73,10 +70,8 @@ __mbsinit_ascii(const mbstate_t *unused) size_t __mbrtowc_ascii(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s, - size_t n, mbstate_t *_RESTRICT_KYWD unused, boolean_t zero) + size_t n, mbstate_t *_RESTRICT_KYWD unused __unused, boolean_t zero) { - _NOTE(ARGUNUSED(unused)); - if (s == NULL) /* Reset to initial shift state (no-op) */ return (0); @@ -94,10 +89,8 @@ __mbrtowc_ascii(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s, size_t __wcrtomb_ascii(char *_RESTRICT_KYWD s, wchar_t wc, - mbstate_t *_RESTRICT_KYWD unused) + mbstate_t *_RESTRICT_KYWD unused __unused) { - _NOTE(ARGUNUSED(unused)); - if (s == NULL) /* Reset to initial shift state (no-op) */ return (1); @@ -111,13 +104,11 @@ __wcrtomb_ascii(char *_RESTRICT_KYWD s, wchar_t wc, size_t __mbsnrtowcs_ascii(wchar_t *_RESTRICT_KYWD dst, const char **_RESTRICT_KYWD src, - size_t nms, size_t len, mbstate_t *_RESTRICT_KYWD unused) + size_t nms, size_t len, mbstate_t *_RESTRICT_KYWD unused __unused) { const char *s; size_t nchr; - _NOTE(ARGUNUSED(unused)); - if (dst == NULL) { s = memchr(*src, '\0', nms); return (s != NULL ? s - *src : nms); @@ -138,13 +129,11 @@ __mbsnrtowcs_ascii(wchar_t *_RESTRICT_KYWD dst, const char **_RESTRICT_KYWD src, size_t __wcsnrtombs_ascii(char *_RESTRICT_KYWD dst, const wchar_t **_RESTRICT_KYWD src, - size_t nwc, size_t len, mbstate_t *_RESTRICT_KYWD unused) + size_t nwc, size_t len, mbstate_t *_RESTRICT_KYWD unused __unused) { const wchar_t *s; size_t nchr; - _NOTE(ARGUNUSED(unused)); - if (dst == NULL) { for (s = *src; nwc > 0 && *s != L'\0'; s++, nwc--) { if (*s < 0 || *s > UCHAR_MAX) { diff --git a/usr/src/lib/libc/port/locale/wctrans.c b/usr/src/lib/libc/port/locale/wctrans.c index 7c808d8e15..59455af8da 100644 --- a/usr/src/lib/libc/port/locale/wctrans.c +++ b/usr/src/lib/libc/port/locale/wctrans.c @@ -27,7 +27,6 @@ */ #include "lint.h" -#include <note.h> #include <errno.h> #include <string.h> #include <wctype.h> @@ -69,7 +68,7 @@ towctrans(wint_t wc, wctrans_t desc) * and tolower. */ wctrans_t -wctrans_l(const char *charclass, locale_t loc) +wctrans_l(const char *charclass, locale_t loc __unused) { struct { const char *name; @@ -80,7 +79,6 @@ wctrans_l(const char *charclass, locale_t loc) { NULL, _WCT_ERROR }, /* Default */ }; int i; - _NOTE(ARGUNUSED(loc)); i = 0; while (ccls[i].name != NULL && strcmp(ccls[i].name, charclass) != 0) diff --git a/usr/src/lib/libc/port/locale/wctype.c b/usr/src/lib/libc/port/locale/wctype.c index 3acc3b2d90..9847d7daa5 100644 --- a/usr/src/lib/libc/port/locale/wctype.c +++ b/usr/src/lib/libc/port/locale/wctype.c @@ -30,7 +30,6 @@ #include <ctype.h> #include <string.h> #include <wctype.h> -#include <note.h> #include <locale.h> #include "_ctype.h" @@ -40,7 +39,7 @@ * their own character classes.) */ wctype_t -wctype_l(const char *property, locale_t loc) +wctype_l(const char *property, locale_t loc __unused) { static const struct { const char *name; @@ -65,7 +64,6 @@ wctype_l(const char *property, locale_t loc) { NULL, 0 }, /* Default */ }; int i; - _NOTE(ARGUNUSED(loc)); i = 0; while (props[i].name != NULL && strcmp(props[i].name, property) != 0) diff --git a/usr/src/lib/libc/port/print/doprnt.c b/usr/src/lib/libc/port/print/doprnt.c index 111591b5d9..2dc380a5e0 100644 --- a/usr/src/lib/libc/port/print/doprnt.c +++ b/usr/src/lib/libc/port/print/doprnt.c @@ -2182,7 +2182,7 @@ wide_S: while (printn > 0) { if ((cnt = wctomb(buf, *wp)) < 0) cnt = 1; - PUT(bufp, cnt); + PUT(bufp, cnt); wp++; printn--; } @@ -2247,13 +2247,13 @@ _watoi(wchar_t *fmt) #define FLAG_LONG_LONG 0x04 #define FLAG_LONG_DBL 0x08 -/* ARGSUSED3 */ #ifdef _WIDE static void -_wmkarglst(wchar_t *fmt, stva_list args, stva_list arglst[], int prflag) +_wmkarglst(wchar_t *fmt, stva_list args, stva_list arglst[], + int prflag __unused) #else /* _WIDE */ static void -_mkarglst(char *fmt, stva_list args, stva_list arglst[], int prflag) +_mkarglst(char *fmt, stva_list args, stva_list arglst[], int prflag __unused) #endif /* _WIDE */ { #ifdef _WIDE @@ -2264,7 +2264,7 @@ _mkarglst(char *fmt, stva_list args, stva_list arglst[], int prflag) static const char skips[] = "# +-.'0123456789h$"; #endif /* _WIDE */ enum types {INT = 1, LONG, CHAR_PTR, DOUBLE, LONG_DOUBLE, VOID_PTR, - LONG_PTR, INT_PTR, LONG_LONG, LONG_LONG_PTR}; + LONG_PTR, INT_PTR, LONG_LONG, LONG_LONG_PTR}; enum types typelst[MAXARGS], curtype; ssize_t n; int maxnum, curargno, flags; @@ -2444,13 +2444,12 @@ _mkarglst(char *fmt, stva_list args, stva_list arglst[], int prflag) * unusual circumstances. * pargs is assumed to contain the value of arglst[MAXARGS - 1]. */ -/* ARGSUSED3 */ #ifdef _WIDE static void -_wgetarg(wchar_t *fmt, stva_list *pargs, long argno, int prflag) +_wgetarg(wchar_t *fmt, stva_list *pargs, long argno, int prflag __unused) #else /* _WIDE */ void -_getarg(char *fmt, stva_list *pargs, long argno, int prflag) +_getarg(char *fmt, stva_list *pargs, long argno, int prflag __unused) #endif /* _WIDE */ { diff --git a/usr/src/lib/libc/port/regex/regexec.c b/usr/src/lib/libc/port/regex/regexec.c index 188e9f08ed..4d697f71df 100644 --- a/usr/src/lib/libc/port/regex/regexec.c +++ b/usr/src/lib/libc/port/regex/regexec.c @@ -50,15 +50,11 @@ #include <regex.h> #include <wchar.h> #include <wctype.h> -#include <note.h> #include <assert.h> #include "utils.h" #include "regex2.h" -/* we want _NOTE, but not NOTE (which collides with our own use) */ -#undef NOTE - static size_t xmbrtowc(wint_t *wi, const char *s, size_t n, mbstate_t *mbs, wint_t dummy) { @@ -80,13 +76,9 @@ xmbrtowc(wint_t *wi, const char *s, size_t n, mbstate_t *mbs, wint_t dummy) } static size_t -xmbrtowc_dummy(wint_t *wi, const char *s, size_t n, mbstate_t *mbs, - wint_t dummy) +xmbrtowc_dummy(wint_t *wi, const char *s, size_t n __unused, + mbstate_t *mbs __unused, wint_t dummy __unused) { - _NOTE(ARGUNUSED(n)); - _NOTE(ARGUNUSED(mbs)); - _NOTE(ARGUNUSED(dummy)); - if (wi != NULL) *wi = (unsigned char)*s; return (1); diff --git a/usr/src/lib/libc/port/stdio/doscan.c b/usr/src/lib/libc/port/stdio/doscan.c index 7d49797578..aa0a770063 100644 --- a/usr/src/lib/libc/port/stdio/doscan.c +++ b/usr/src/lib/libc/port/stdio/doscan.c @@ -84,10 +84,10 @@ static int readchar(FILE *, int *); static int string(int *, int *, int, int, int, char *, FILE *, va_list *); static int wstring(int *, int *, int, int, int, FILE *, va_list *); static int wbrstring(int *, int *, int, int, int, FILE *, - unsigned char *, va_list *); + unsigned char *, va_list *); #ifdef _WIDE static int brstring(int *, int *, int, int, int, FILE *, - unsigned char *, va_list *); + unsigned char *, va_list *); #endif static int _bi_getwc(FILE *); static int _bi_ungetwc(wint_t, FILE *); @@ -122,10 +122,11 @@ _doscan(FILE *iop, const char *fmt, va_list va_Alist) /* ARGSUSED3 */ #ifdef _WIDE int -__wdoscan_u(FILE *iop, const wchar_t *fmt, va_list va_Alist, int scflag) +__wdoscan_u(FILE *iop, const wchar_t *fmt, va_list va_Alist, + int scflag __unused) #else /* _WIDE */ int -__doscan_u(FILE *iop, const char *sfmt, va_list va_Alist, int scflag) +__doscan_u(FILE *iop, const char *sfmt, va_list va_Alist, int scflag __unused) #endif /* _WIDE */ { #ifdef _WIDE @@ -840,8 +841,8 @@ readchar(FILE *iop, int *chcount) } static int -string(int *chcount, int *flag_eof, int stow, int type, int len, char *tab, - FILE *iop, va_list *listp) +string(int *chcount, int *flag_eof, int stow, int type, int len, + char *tab __unused, FILE *iop, va_list *listp) { int ch; char *ptr; @@ -1115,9 +1116,8 @@ _watoi(wchar_t *fmt) } #endif /* _WIDE */ -/* ARGSUSED3 */ static int -wbrstring(int *chcount, int *flag_eof, int stow, int type, +wbrstring(int *chcount, int *flag_eof, int stow, int type __unused, int len, FILE *iop, unsigned char *brstr, va_list *listp) { wint_t wch; @@ -1181,7 +1181,7 @@ wbrstring(int *chcount, int *flag_eof, int stow, int type, #ifdef _WIDE static int -brstring(int *chcount, int *flag_eof, int stow, int type, +brstring(int *chcount, int *flag_eof, int stow, int type __unused, int len, FILE *iop, unsigned char *brstr, va_list *listp) { wint_t wch; diff --git a/usr/src/lib/libc/port/stdio/getpass.c b/usr/src/lib/libc/port/stdio/getpass.c index c94a57fdd5..cb5e81f7d7 100644 --- a/usr/src/lib/libc/port/stdio/getpass.c +++ b/usr/src/lib/libc/port/stdio/getpass.c @@ -25,7 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ #pragma weak _getpass = getpass #pragma weak _getpassphrase = getpassphrase @@ -116,9 +116,8 @@ __getpass(const char *prompt, int size) return (pbuf); } -/* ARGSUSED */ static void -catch(int x) +catch(int x __unused) { intrupt = 1; } diff --git a/usr/src/lib/libc/port/stdio/open_memstream.c b/usr/src/lib/libc/port/stdio/open_memstream.c index 01d5af80ce..f6c1f9128b 100644 --- a/usr/src/lib/libc/port/stdio/open_memstream.c +++ b/usr/src/lib/libc/port/stdio/open_memstream.c @@ -114,7 +114,8 @@ memstream_newsize(size_t pos, size_t alloc, size_t nbytes, size_t *nallocp) * The SUSv4 spec says that this should not support reads. */ static ssize_t -open_memstream_read(FILE *iop, char *buf, size_t nbytes) +open_memstream_read(FILE *iop __unused, char *buf __unused, + size_t nbytes __unused) { errno = EBADF; return (-1); diff --git a/usr/src/lib/libc/port/stdio/open_wmemstream.c b/usr/src/lib/libc/port/stdio/open_wmemstream.c index a3968328f2..e539e1f754 100644 --- a/usr/src/lib/libc/port/stdio/open_wmemstream.c +++ b/usr/src/lib/libc/port/stdio/open_wmemstream.c @@ -44,7 +44,8 @@ typedef struct wmemstream { * The SUSv4 spec says that this should not support reads. */ static ssize_t -open_wmemstream_read(FILE *iop, char *buf, size_t nbytes) +open_wmemstream_read(FILE *iop __unused, char *buf __unused, + size_t nbytes __unused) { errno = EBADF; return (-1); diff --git a/usr/src/lib/libc/port/stdio/tmpfile.c b/usr/src/lib/libc/port/stdio/tmpfile.c index 884a7a369a..d130b136c7 100644 --- a/usr/src/lib/libc/port/stdio/tmpfile.c +++ b/usr/src/lib/libc/port/stdio/tmpfile.c @@ -25,9 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* All Rights Reserved */ /* * tmpfile - return a pointer to an update file that can be @@ -52,9 +50,8 @@ static mutex_t seed_lk = DEFAULTMUTEX; #define XS "\bXXXXXX" /* a '\b' character is prepended to this */ /* string to avoid conflicts with names */ /* generated by tmpnam() */ -/*ARGSUSED*/ static FILE * -_common(boolean_t large_file) +_common(boolean_t large_file __unused) { char tfname[L_tmpnam]; FILE *p; diff --git a/usr/src/lib/libc/port/threads/cancel.c b/usr/src/lib/libc/port/threads/cancel.c index f9e5a3a07c..3072776dbe 100644 --- a/usr/src/lib/libc/port/threads/cancel.c +++ b/usr/src/lib/libc/port/threads/cancel.c @@ -269,7 +269,7 @@ _canceloff_nocancel() */ void __pthread_cleanup_push(void (*routine)(void *), - void *args, caddr_t fp, _cleanup_t *clnup_info) + void *args, caddr_t fp, _cleanup_t *clnup_info) { ulwp_t *self = curthread; __cleanup_t *infop = (__cleanup_t *)clnup_info; @@ -286,9 +286,8 @@ __pthread_cleanup_push(void (*routine)(void *), * POSIX.1c pthread_cleanup_pop(). It calls this routine to pop the * handler off the curthread's struct and execute it if necessary. */ -/* ARGSUSED1 */ void -__pthread_cleanup_pop(int ex, _cleanup_t *clnup_info) +__pthread_cleanup_pop(int ex, _cleanup_t *clnup_info __unused) { ulwp_t *self = curthread; __cleanup_t *infop = self->ul_clnup_hdr; diff --git a/usr/src/lib/libc/port/threads/door_calls.c b/usr/src/lib/libc/port/threads/door_calls.c index 87124a6a37..2204762fff 100644 --- a/usr/src/lib/libc/port/threads/door_calls.c +++ b/usr/src/lib/libc/port/threads/door_calls.c @@ -823,9 +823,8 @@ door_create_func(void *arg) /* * The default door_server_func_t. */ -/* ARGSUSED */ static void -door_create_server(door_info_t *dip) +door_create_server(door_info_t *dip __unused) { (void) thr_create(NULL, 0, door_create_func, NULL, THR_DETACHED, NULL); yield(); /* Gives server thread a chance to run */ diff --git a/usr/src/lib/libc/port/threads/rwlock.c b/usr/src/lib/libc/port/threads/rwlock.c index faff5da953..7a9d621b0b 100644 --- a/usr/src/lib/libc/port/threads/rwlock.c +++ b/usr/src/lib/libc/port/threads/rwlock.c @@ -198,9 +198,8 @@ rw_write_held(rwlock_t *rwlp) } #pragma weak _rwlock_init = rwlock_init -/* ARGSUSED2 */ int -rwlock_init(rwlock_t *rwlp, int type, void *arg) +rwlock_init(rwlock_t *rwlp, int type, void *arg __unused) { ulwp_t *self = curthread; diff --git a/usr/src/lib/libc/port/threads/sema.c b/usr/src/lib/libc/port/threads/sema.c index c9512b9338..5f68a24c72 100644 --- a/usr/src/lib/libc/port/threads/sema.c +++ b/usr/src/lib/libc/port/threads/sema.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "lint.h" #include "thr_uberdata.h" @@ -42,9 +40,8 @@ sema_held(sema_t *sp) } #pragma weak _sema_init = sema_init -/* ARGSUSED3 */ int -sema_init(sema_t *sp, unsigned int count, int type, void *arg) +sema_init(sema_t *sp, unsigned int count, int type, void *arg __unused) { if (_semvaluemax == 0) _semvaluemax = (uint32_t)_sysconf(_SC_SEM_VALUE_MAX); diff --git a/usr/src/lib/libc/port/threads/synch.c b/usr/src/lib/libc/port/threads/synch.c index b2c5980f9a..b9ce5593cb 100644 --- a/usr/src/lib/libc/port/threads/synch.c +++ b/usr/src/lib/libc/port/threads/synch.c @@ -3142,9 +3142,8 @@ heldlock_exit(void) } #pragma weak _cond_init = cond_init -/* ARGSUSED2 */ int -cond_init(cond_t *cvp, int type, void *arg) +cond_init(cond_t *cvp, int type, void *arg __unused) { if (type != USYNC_THREAD && type != USYNC_PROCESS) return (EINVAL); |