Mercurial > illumos > illumos-gate
changeset 11053:f33a1c7f3155
6893690 some ON cmds are not lint clean
line wrap: on
line diff
--- a/usr/src/cmd/awk/main.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/awk/main.c Wed Nov 11 21:59:42 2009 -0800 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,15 +20,13 @@ */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <ctype.h> #include <signal.h> @@ -152,7 +149,7 @@ dprintf(("argc=%d, argv[0]=%s\n", argc, argv[0])); arginit(argc, (uchar **)argv); envinit((uchar **)envp); - yyparse(); + (void) yyparse(); if (fs) *FS = qstring(fs, '\0'); dprintf(("errorflag=%d\n", errorflag));
--- a/usr/src/cmd/fruadm/fruadm.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/fruadm/fruadm.c Wed Nov 11 21:59:42 2009 -0800 @@ -20,12 +20,10 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <limits.h> #include <stdio.h> #include <stdlib.h> @@ -688,7 +686,7 @@ /* field not found add the the record in one of the segment */ for (cnt = 0; cnt < NUM_OF_SEGMENT; cnt++) { - fru_list_elems_in(nodehdl, segment_name[cnt], &elem); + (void) fru_list_elems_in(nodehdl, segment_name[cnt], &elem); for (elem_cnt = 0; elem_cnt < elem.num; elem_cnt++) { if ((strcmp(*ptr, elem.strs[elem_cnt])) == 0) { add_flag = 0;
--- a/usr/src/cmd/lvm/md_monitord/md_monitord.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/md_monitord/md_monitord.c Wed Nov 11 21:59:42 2009 -0800 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * probedev issues ioctls for all the metadevices */ @@ -110,7 +107,7 @@ monitord_print(6, gettext( " starting probe from signal handler\n")); probe_all_devs(startup, &status, sig_verbose); - setitimer(ITIMER_REAL, &itimer, NULL); + (void) setitimer(ITIMER_REAL, &itimer, NULL); } if (sig == SIGHUP) monitord_exit(sig); @@ -210,7 +207,7 @@ daemon_lock_file, strerror(errno)); monitord_exit(-1); } - unlink(daemon_lock_file); + (void) unlink(daemon_lock_file); } @@ -239,12 +236,12 @@ } else { if (logflag) { (void) syslog(LOG_DEBUG, "%s[%ld]: ", - prog, getpid()); + prog, getpid()); (void) vsyslog(LOG_DEBUG, message, ap); } else { if (newline) { (void) fprintf(stdout, "%s[%ld]: ", - prog, getpid()); + prog, getpid()); (void) vfprintf(stdout, message, ap); } else { (void) vfprintf(stdout, message, ap); @@ -288,7 +285,7 @@ set_t max_sets, set_idx; probe_started = True; - set_snarf(statusp); + (void) set_snarf(statusp); if ((max_sets = get_max_sets(statusp)) == 0) { mde_perror(statusp, gettext( @@ -323,12 +320,12 @@ /* if we dont have ownership or cannot lock it continue. */ if ((meta_check_ownership(sp, statusp) == NULL) && - meta_lock(sp, TRUE, statusp)) + meta_lock(sp, TRUE, statusp)) continue; /* Skip if a MN set */ if (meta_is_mn_set(sp, statusp)) { - meta_unlock(sp, statusp); + (void) meta_unlock(sp, statusp); continue; } @@ -336,7 +333,7 @@ probe_raid_devs(verbose); probe_trans_devs(verbose); probe_hotspare_devs(verbose); - meta_unlock(sp, statusp); + (void) meta_unlock(sp, statusp); } if (meta_notify_createq(MD_FF_Q, 0, statusp)) { mde_perror(statusp, gettext( @@ -350,7 +347,7 @@ */ if (startup == True) - setitimer(ITIMER_REAL, &itimer, NULL); + (void) setitimer(ITIMER_REAL, &itimer, NULL); } evid_t @@ -364,13 +361,13 @@ do { if (meta_notify_getev(MD_FF_Q, EVFLG_WAIT, &event, - statusp) < 0) { + statusp) < 0) { monitord_print(8, "meta_notify_getev: errno 0x%x\n", -errno); monitord_exit(-errno); } } while ((event.ev != EV_IOERR && event.ev != EV_ERRED && - event.ev != EV_LASTERRED)); + event.ev != EV_LASTERRED)); return (event.ev); } @@ -405,13 +402,13 @@ } if (md_init(argc, argv, 0, 1, &status) != 0 || - meta_check_root(&status) != 0) { + meta_check_root(&status) != 0) { mde_perror(&status, ""); monitord_exit(1); } (void) sigfillset(&mask); - thr_sigsetmask(SIG_BLOCK, &mask, NULL); + (void) thr_sigsetmask(SIG_BLOCK, &mask, NULL); if (argc > 7) { usage(); @@ -474,7 +471,7 @@ (void) sigemptyset(&mask); (void) sigaddset(&mask, SIGALRM); (void) sigaddset(&mask, SIGHUP); - thr_sigsetmask(SIG_UNBLOCK, &mask, NULL); + (void) thr_sigsetmask(SIG_UNBLOCK, &mask, NULL); /* demonize ourselves */ if (debug_level < DEBUG_LEVEL_FORK) {
--- a/usr/src/cmd/lvm/md_monitord/probedev.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/md_monitord/probedev.c Wed Nov 11 21:59:42 2009 -0800 @@ -65,7 +65,7 @@ cname = hsp->hsnamep->cname; bname = hsp->hsnamep->bname; nlp = NULL; - metanamelist_append(&nlp, hsp->hsnamep); + (void) metanamelist_append(&nlp, hsp->hsnamep); hs_state = hs_state_to_name(hsp, NULL); /* print hotspare */ if (verbose == True) @@ -112,7 +112,7 @@ * the minor numbers. */ - memset(&probe_ioc, 0, sizeof (probe_ioc)); + (void) memset(&probe_ioc, 0, sizeof (probe_ioc)); iocp = &probe_ioc; if ((iocp->mnum_list = (uintptr_t)calloc(ndevs, sizeof (minor_t)))
--- a/usr/src/cmd/lvm/rpc.mdcommd/mddoors.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/rpc.mdcommd/mddoors.c Wed Nov 11 21:59:42 2009 -0800 @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -107,7 +107,7 @@ daemon_lock_file, strerror(errno)); return; } - unlink(daemon_lock_file); + (void) unlink(daemon_lock_file); } /* @@ -160,7 +160,7 @@ free_result(result); } - door_return((char *)&kresult, sizeof (md_mn_kresult_t), NULL, 0); + (void) door_return((char *)&kresult, sizeof (md_mn_kresult_t), NULL, 0); } @@ -210,7 +210,7 @@ } rl.rlim_max = 0; - getrlimit(RLIMIT_NOFILE, &rl); + (void) getrlimit(RLIMIT_NOFILE, &rl); if ((size = rl.rlim_max) == 0) { syslog(LOG_DAEMON | LOG_ERR, gettext("Cannot getrlimit")); exit(1); @@ -226,7 +226,7 @@ i = open("/dev/null", 2); (void) dup2(i, 1); (void) dup2(i, 2); - setsid(); + (void) setsid(); /* here endeth the daemonizing code */ @@ -236,7 +236,7 @@ (void) signal(SIGQUIT, SIG_IGN); (void) signal(SIGTERM, SIG_IGN); - atexit(daemon_cleanup); + (void) atexit(daemon_cleanup); /* Resume any previously blocked resync */ meta_mirror_resync_unblock_all();
--- a/usr/src/cmd/lvm/rpc.mdcommd/mdmn_commd_server.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/rpc.mdcommd/mdmn_commd_server.c Wed Nov 11 21:59:42 2009 -0800 @@ -202,8 +202,8 @@ #define FLUSH_DEBUGFILE() \ if (commdout != (FILE *)NULL) { \ - fflush(commdout); \ - fsync(fileno(commdout)); \ + (void) fflush(commdout); \ + (void) fsync(fileno(commdout)); \ } static void @@ -219,21 +219,22 @@ FLUSH_DEBUGFILE(); if (master_err != MDMNE_ACK) { - snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: RPC fail on master " - "when processing message type %d\n", type); + (void) snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: RPC " + "fail on master when processing message type %d\n", type); } else if (slave_result == NULL) { - snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: RPC fail on node " - "%d when processing message type %d\n", nid, type); + (void) snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: RPC fail " + "on node %d when processing message type %d\n", nid, type); } else { - snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: Inconsistent " - "return value from node %d when processing message " - "type %d. Master exitval = %d, Slave exitval = %d\n", - nid, type, master_exitval, slave_result->mmr_exitval); + (void) snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: " + "Inconsistent return value from node %d when processing " + "message type %d. Master exitval = %d, " + "Slave exitval = %d\n", nid, type, master_exitval, + slave_result->mmr_exitval); } commd_err.size = strlen(msg_buf); commd_err.md_message = (uint64_t)(uintptr_t)&msg_buf[0]; - metaioctl(MD_MN_COMMD_ERR, &commd_err, &mne, "rpc.mdcommd"); + (void) metaioctl(MD_MN_COMMD_ERR, &commd_err, &mne, "rpc.mdcommd"); (void) uadmin(A_DUMP, AD_BOOT, NULL); } @@ -245,7 +246,7 @@ int warned = 0; for (; ; ) { - sleep(10); + (void) sleep(10); /* No output file, nothing to do */ if (commdout == (FILE *)NULL) continue; @@ -279,7 +280,7 @@ warned = 0; } - fflush(commdout); + (void) fflush(commdout); } } @@ -388,7 +389,7 @@ for (class = MD_MSG_CLASS1; class < MD_MN_NCLASSES; class++) { mx = mdmn_get_initiator_table_mx(setno, class); - mutex_lock(mx); + (void) mutex_lock(mx); /* then is the registered time */ then = @@ -396,18 +397,19 @@ if ((then != 0) && (now > then)) { timeout_initiator(setno, class); } - mutex_unlock(mx); + (void) mutex_unlock(mx); } } /* it's ok to check only once per second */ - sleep(1); + (void) sleep(1); /* is there work to do? */ - mutex_lock(&check_timeout_mutex); + (void) mutex_lock(&check_timeout_mutex); if (messages_on_their_way == 0) { - cond_wait(&check_timeout_cv, &check_timeout_mutex); + (void) cond_wait(&check_timeout_cv, + &check_timeout_mutex); } - mutex_unlock(&check_timeout_mutex); + (void) mutex_unlock(&check_timeout_mutex); } } @@ -429,7 +431,7 @@ /* if commdout is non-NULL it is an open FILE, we'd better close it */ if (commdout != (FILE *)NULL) { - fclose(commdout); + (void) fclose(commdout); } commdoutfile = commd_get_outfile(); @@ -547,7 +549,7 @@ /* Make setup_debug() be the action in case of SIGHUP */ sighandler.sa_flags = 0; - sigfillset(&sighandler.sa_mask); + (void) sigfillset(&sighandler.sa_mask); sighandler.sa_handler = (void (*)(int)) setup_debug; sigaction(SIGHUP, &sighandler, NULL); @@ -556,13 +558,13 @@ commd_debug(MD_MMV_MISC, "global init called %s\n", ctime(&clock_val)); /* start a thread that flushes out the debug on a regular basis */ - thr_create(NULL, 0, (void *(*)(void *))flush_fcout, + (void) thr_create(NULL, 0, (void *(*)(void *))flush_fcout, (void *) NULL, THR_DETACHED, NULL); /* global rwlock's / mutex's / cond_t's go here */ - mutex_init(&check_timeout_mutex, USYNC_THREAD, NULL); - cond_init(&check_timeout_cv, USYNC_THREAD, NULL); - mutex_init(&get_setdesc_mutex, USYNC_THREAD, NULL); + (void) mutex_init(&check_timeout_mutex, USYNC_THREAD, NULL); + (void) cond_init(&check_timeout_cv, USYNC_THREAD, NULL); + (void) mutex_init(&get_setdesc_mutex, USYNC_THREAD, NULL); /* Make sure the initiator table is initialized correctly */ for (set = 0; set < MD_MAXSETS; set++) { @@ -573,7 +575,7 @@ /* setup the check for timeouts */ - thr_create(NULL, 0, (void *(*)(void *))check_timeouts, + (void) thr_create(NULL, 0, (void *(*)(void *))check_timeouts, (void *) NULL, THR_DETACHED, NULL); md_commd_global_state |= MD_CGS_INITED; @@ -611,21 +613,25 @@ if (sd == NULL) { mdsetname_t *sp; - rw_unlock(&set_desc_rwlock[setno]); /* readlock -> writelock */ - rw_wrlock(&set_desc_rwlock[setno]); + /* readlock -> writelock */ + (void) rw_unlock(&set_desc_rwlock[setno]); + (void) rw_wrlock(&set_desc_rwlock[setno]); sp = metasetnosetname(setno, &ep); /* Only one thread is supposed to be in metaget_setdesc() */ - mutex_lock(&get_setdesc_mutex); + (void) mutex_lock(&get_setdesc_mutex); sd = metaget_setdesc(sp, &ep); - mutex_unlock(&get_setdesc_mutex); + (void) mutex_unlock(&get_setdesc_mutex); if (sd == NULL) { - rw_unlock(&set_desc_rwlock[setno]); /* back to ... */ - rw_rdlock(&set_desc_rwlock[setno]); /* ... readlock */ + /* back to ... */ + (void) rw_unlock(&set_desc_rwlock[setno]); + /* ... readlock */ + (void) rw_rdlock(&set_desc_rwlock[setno]); return (-1); } set_descriptor[setno] = sd; - rw_unlock(&set_desc_rwlock[setno]); /* back to readlock */ - rw_rdlock(&set_desc_rwlock[setno]); + /* back to readlock */ + (void) rw_unlock(&set_desc_rwlock[setno]); + (void) rw_rdlock(&set_desc_rwlock[setno]); } /* first we have to find the node name for this node id */ @@ -638,7 +644,7 @@ if (node == (md_mnnode_desc *)NULL) { commd_debug(MD_MMV_SYSLOG, "FATAL: node %d not found in set %d\n", nid, setno); - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); return (-2); } @@ -649,7 +655,7 @@ if ((node->nd_flags & MD_MN_NODE_OWN) == 0) { commd_debug(MD_MMV_INIT, "init: %s didn't join set %d\n", node->nd_nodename ? node->nd_nodename : "NULL", setno); - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); return (-2); } @@ -683,7 +689,7 @@ if (client[setno][nid] == (CLIENT *) NULL) { clnt_pcreateerror(node->nd_nodename); - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); return (-3); } /* this node has the license to send */ @@ -695,7 +701,7 @@ (char *)&FOUR_SECS); } - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); return (0); } @@ -718,13 +724,17 @@ int ret = 0; while ((client[setno][nodeid] == (CLIENT *)NULL) && (ret == 0)) { - rw_unlock(&client_rwlock[setno]); /* upgrade reader ... */ - rw_wrlock(&client_rwlock[setno]); /* ... to writer lock. */ + /* upgrade reader ... */ + (void) rw_unlock(&client_rwlock[setno]); + /* ... to writer lock. */ + (void) rw_wrlock(&client_rwlock[setno]); if (mdmn_init_client(setno, nodeid) != 0) { ret = MDMNE_RPC_FAIL; } - rw_unlock(&client_rwlock[setno]); /* downgrade writer ... */ - rw_rdlock(&client_rwlock[setno]); /* ... back to reader lock. */ + /* downgrade writer ... */ + (void) rw_unlock(&client_rwlock[setno]); + /* ... back to reader lock. */ + (void) rw_rdlock(&client_rwlock[setno]); } return (ret); } @@ -755,18 +765,18 @@ */ if ((todo & MDMN_SET_MUTEXES) && ((md_mn_set_inited[setno] & MDMN_SET_MUTEXES) == 0)) { - mutex_init(&mdmn_busy_mutex[setno], USYNC_THREAD, NULL); - cond_init(&mdmn_busy_cv[setno], USYNC_THREAD, NULL); - rwlock_init(&client_rwlock[setno], USYNC_THREAD, NULL); - rwlock_init(&set_desc_rwlock[setno], USYNC_THREAD, NULL); + (void) mutex_init(&mdmn_busy_mutex[setno], USYNC_THREAD, NULL); + (void) cond_init(&mdmn_busy_cv[setno], USYNC_THREAD, NULL); + (void) rwlock_init(&client_rwlock[setno], USYNC_THREAD, NULL); + (void) rwlock_init(&set_desc_rwlock[setno], USYNC_THREAD, NULL); for (class = MD_MSG_CLASS1; class < MD_MN_NCLASSES; class++) { - mutex_init(mdmn_get_master_table_mx(setno, class), + (void) mutex_init(mdmn_get_master_table_mx(setno, + class), USYNC_THREAD, NULL); + (void) cond_init(mdmn_get_master_table_cv(setno, class), USYNC_THREAD, NULL); - cond_init(mdmn_get_master_table_cv(setno, class), - USYNC_THREAD, NULL); - mutex_init(mdmn_get_initiator_table_mx(setno, class), - USYNC_THREAD, NULL); + (void) mutex_init(mdmn_get_initiator_table_mx(setno, + class), USYNC_THREAD, NULL); } md_mn_set_inited[setno] |= MDMN_SET_MUTEXES; } @@ -796,8 +806,8 @@ * To ensure that the file has the appropriate size, * we write a byte at the end of the file. */ - lseek(fd, filesize + 1, SEEK_SET); - write(fd, "\0", 1); + (void) lseek(fd, filesize + 1, SEEK_SET); + (void) write(fd, "\0", 1); /* at this point we have a file in place that we can mmap */ addr = mmap(0, filesize, PROT_READ | PROT_WRITE, @@ -813,7 +823,7 @@ /* finally we initialize the mutexes that protect the mct */ for (class = MD_MSG_CLASS1; class < MD_MN_NCLASSES; class++) { - mutex_init(&(mct_mutex[setno][class]), + (void) mutex_init(&(mct_mutex[setno][class]), USYNC_THREAD, NULL); } @@ -838,9 +848,9 @@ /* flush local copy of rpc.metad data */ metaflushsetname(sp); - mutex_lock(&get_setdesc_mutex); + (void) mutex_lock(&get_setdesc_mutex); sd = metaget_setdesc(sp, &ep); - mutex_unlock(&get_setdesc_mutex); + (void) mutex_unlock(&get_setdesc_mutex); if (sd == NULL) { commd_debug(MD_MMV_SYSLOG, @@ -965,12 +975,12 @@ setno = msg->msg_setno; /* set the sender, so the master knows who to send the results */ - rw_rdlock(&set_desc_rwlock[setno]); + (void) rw_rdlock(&set_desc_rwlock[setno]); msg->msg_sender = set_descriptor[setno]->sd_mn_mynode->nd_nodeid; set_master = set_descriptor[setno]->sd_mn_master_nodeid; mx = mdmn_get_initiator_table_mx(setno, class); - mutex_lock(mx); + (void) mutex_lock(mx); /* * Here we check, if the initiator table slot for this set/class @@ -999,12 +1009,12 @@ try_master = 2; /* return failure after two retries */ while ((success == MDMNE_ACK) && (try_master--)) { - rw_rdlock(&client_rwlock[setno]); + (void) rw_rdlock(&client_rwlock[setno]); /* is the rpc client to the master still around ? */ if (check_client(setno, set_master)) { success = MDMNE_RPC_FAIL; FLUSH_DEBUGFILE(); - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); break; /* out of try_master-loop */ } @@ -1022,24 +1032,24 @@ * Probably something happened to the daemon on the * master. Kill the client, and try again... */ - rw_unlock(&client_rwlock[setno]); - rw_wrlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); + (void) rw_wrlock(&client_rwlock[setno]); mdmn_clnt_destroy(client[setno][set_master]); if (client[setno][set_master] != (CLIENT *)NULL) { client[setno][set_master] = (CLIENT *)NULL; } - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); continue; } else if (*rpc_err != MDMNE_ACK) { /* something went wrong, break out */ success = *rpc_err; free(rpc_err); - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); break; /* out of try_master-loop */ } - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); free(rpc_err); /* @@ -1052,14 +1062,14 @@ mdmn_register_initiator_table(setno, class, msg, transp); /* tell check_timeouts, there's work to do */ - mutex_lock(&check_timeout_mutex); + (void) mutex_lock(&check_timeout_mutex); messages_on_their_way++; - cond_signal(&check_timeout_cv); - mutex_unlock(&check_timeout_mutex); + (void) cond_signal(&check_timeout_cv); + (void) mutex_unlock(&check_timeout_mutex); break; /* out of try_master-loop */ } - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); if (success == MDMNE_ACK) { commd_debug(MD_MMV_SEND, @@ -1091,7 +1101,7 @@ free_msg(msg); /* the alloc was done in mdmn_send_svc_2 */ Free(matp); - mutex_unlock(mx); + (void) mutex_unlock(mx); return (NULL); } @@ -1131,7 +1141,7 @@ result->mmr_flags = msg->msg_flags; MSGID_COPY(&(msg->msg_msgid), &(result->mmr_msgid)); - mutex_lock(&mct_mutex[setno][class]); + (void) mutex_lock(&mct_mutex[setno][class]); completed = mdmn_check_completion(msg, result); if (completed == MDMN_MCT_NOT_DONE) { /* message not yet processed locally */ @@ -1144,7 +1154,7 @@ * so we won't start a second handler for it */ (void) mdmn_mark_completion(msg, NULL, MDMN_MCT_IN_PROGRESS); - mutex_unlock(&mct_mutex[setno][class]); + (void) mutex_unlock(&mct_mutex[setno][class]); /* here we actually process the message on the master */ (*handler)(msg, MD_MSGF_ON_MASTER, result); @@ -1154,7 +1164,7 @@ MSGID_ELEMS(msg->msg_msgid), msgtype); /* Mark the message as fully processed, store the result */ - mutex_lock(&mct_mutex[setno][class]); + (void) mutex_lock(&mct_mutex[setno][class]); (void) mdmn_mark_completion(msg, result, MDMN_MCT_DONE); } else if (completed == MDMN_MCT_DONE) { commd_debug(MD_MMV_PROC_M, "proc_mas: " @@ -1166,7 +1176,7 @@ MSGID_ELEMS(msg->msg_msgid), msgtype); } else { /* MCT error occurred (should never happen) */ - mutex_unlock(&mct_mutex[setno][class]); + (void) mutex_unlock(&mct_mutex[setno][class]); result->mmr_comm_state = MDMNE_LOG_FAIL; commd_debug(MD_MMV_SYSLOG, "WARNING " "mdmn_check_completion returned %d " @@ -1174,7 +1184,7 @@ MSGID_ELEMS(msg->msg_msgid)); return (MDMNE_LOG_FAIL); } - mutex_unlock(&mct_mutex[setno][class]); + (void) mutex_unlock(&mct_mutex[setno][class]); return (MDMNE_ACK); } @@ -1229,7 +1239,7 @@ return (MDMNE_ABORT); } - rw_rdlock(&client_rwlock[setno]); + (void) rw_rdlock(&client_rwlock[setno]); /* unable to create client? Ignore it */ if (check_client(setno, nid)) { /* @@ -1248,7 +1258,7 @@ commd_debug(MD_MMV_PROC_M, "proc_mas: (%d,0x%llx-%d) " "WARNING couldn't create client for %s\n", MSGID_ELEMS(msg->msg_msgid), node->nd_nodename); - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); return (MDMNE_IGNORE_NODE); } /* let's be paranoid and check again before sending */ @@ -1259,15 +1269,15 @@ * once again. */ commd_debug(MD_MMV_PROC_M, "client is NULL\n"); - rw_unlock(&client_rwlock[setno]); - sleep(1); + (void) rw_unlock(&client_rwlock[setno]); + (void) sleep(1); continue; } /* send it over, it will return immediately */ ret = mdmn_work_2(msg, client[setno][nid], nid); - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); if (ret != NULL) { commd_debug(MD_MMV_PROC_M, @@ -1288,12 +1298,12 @@ * Kill the client, and try again. * check_client() will create a new client */ - rw_wrlock(&client_rwlock[setno]); + (void) rw_wrlock(&client_rwlock[setno]); mdmn_clnt_destroy(client[setno][nid]); if (client[setno][nid] != (CLIENT *)NULL) { client[setno][nid] = (CLIENT *)NULL; } - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); /* ... but don't try infinitely */ --rpc_retries; @@ -1305,7 +1315,7 @@ * if we wait long enough */ if (*ret == MDMNE_CLASS_LOCKED) { - sleep(1); + (void) sleep(1); free(ret); ret = NULL; continue; @@ -1374,10 +1384,10 @@ /* * Destroy the client and try the rpc call again */ - rw_wrlock(&client_rwlock[setno]); + (void) rw_wrlock(&client_rwlock[setno]); mdmn_clnt_destroy(client[setno][nid]); client[setno][nid] = (CLIENT *)NULL; - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); goto retry_rpc; } } else if (err == EINTR) { @@ -1442,7 +1452,7 @@ "proc_mas: received (%d, 0x%llx-%d) set=%d, class=%d, type=%d\n", MSGID_ELEMS(msg->msg_msgid), setno, orig_class, msgtype); - rw_rdlock(&set_desc_rwlock[setno]); + (void) rw_rdlock(&set_desc_rwlock[setno]); set_master = set_descriptor[setno]->sd_mn_master_nodeid; result->mmr_sender = set_master; /* @@ -1478,9 +1488,9 @@ * Note that the mark_busy was already done by * mdmn_work_svc_2() */ - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); mdmn_mark_class_unbusy(setno, orig_class); - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); } if (err == MDMNE_CLASS_BUSY) { @@ -1495,7 +1505,7 @@ result->mmr_comm_state = MDMNE_CLASS_BUSY; } ret = (int *)NULL; - rw_rdlock(&client_rwlock[setno]); + (void) rw_rdlock(&client_rwlock[setno]); if (check_client(setno, sender)) { commd_debug(MD_MMV_SYSLOG, @@ -1504,7 +1514,7 @@ ret = mdmn_wakeup_initiator_2(result, client[setno][sender], sender); } - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); if (ret == (int *)NULL) { commd_debug(MD_MMV_SYSLOG, @@ -1521,7 +1531,7 @@ if (err == MDMNE_LOG_FAIL) { /* we can't proceed here */ free_result(result); - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); return; } else if (err == MDMNE_CLASS_BUSY) { mdmn_changelog_record_t *lr; @@ -1622,12 +1632,12 @@ * Granularity could be finer (setno/class) */ if (class != orig_class) { - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); while (mdmn_mark_class_busy(setno, class) == FALSE) { - cond_wait(&mdmn_busy_cv[setno], + (void) cond_wait(&mdmn_busy_cv[setno], &mdmn_busy_mutex[setno]); } - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); } master_err = do_message_locally(cmsg, result); @@ -1641,9 +1651,11 @@ * break out of the message loop */ if (class != orig_class) { - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock( + &mdmn_busy_mutex[setno]); mdmn_mark_class_unbusy(setno, class); - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock( + &mdmn_busy_mutex[setno]); } break; } @@ -1656,9 +1668,9 @@ if (cmsg->msg_flags & MD_MSGF_NO_BCAST) { /* if appropriate, unbusy the class */ if (class != orig_class) { - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); mdmn_mark_class_unbusy(setno, class); - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); } continue; } @@ -1675,7 +1687,7 @@ - rw_rdlock(&set_desc_rwlock[setno]); + (void) rw_rdlock(&set_desc_rwlock[setno]); /* Send the message to all other nodes */ for (node = set_descriptor[setno]->sd_nodelist; node; node = node->nd_next) { @@ -1697,7 +1709,7 @@ continue; } - mutex_lock(mx); + (void) mutex_lock(mx); /* * Register the node that is addressed, * so we can detect unsolicited messages @@ -1724,10 +1736,10 @@ "proc_mas: got result for (%d,0x%llx-%d)\n", MSGID_ELEMS(cmsg->msg_msgid)); } else if (err == MDMNE_IGNORE_NODE) { - mutex_unlock(mx); + (void) mutex_unlock(mx); continue; /* send to next node */ } - mutex_unlock(mx); + (void) mutex_unlock(mx); /* @@ -1815,14 +1827,14 @@ } } /* End of loop over the nodes */ - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); /* release the current class again */ if (class != orig_class) { - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); mdmn_mark_class_unbusy(setno, class); - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); } /* are we supposed to quit entirely ? */ @@ -1862,7 +1874,7 @@ commd_debug(MD_MMV_PROC_M, "proc_mas: calling unlog_msg for (%d,0x%llx-%d) type %d\n", MSGID_ELEMS(msg->msg_msgid), msgtype); - mdmn_unlog_msg(msg); + (void) mdmn_unlog_msg(msg); commd_debug(MD_MMV_PROC_M, "proc_mas: done unlog_msg for (%d,0x%llx-%d) type %d\n", MSGID_ELEMS(msg->msg_msgid), msgtype); @@ -1880,7 +1892,7 @@ /* if we have an inited client, send result */ ret = (int *)NULL; - rw_rdlock(&client_rwlock[setno]); + (void) rw_rdlock(&client_rwlock[setno]); if (check_client(setno, sender)) { commd_debug(MD_MMV_SYSLOG, "proc_mas: unable to create client for initiator\n"); @@ -1888,7 +1900,7 @@ ret = mdmn_wakeup_initiator_2(result, client[setno][sender], sender); } - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); if (ret == (int *)NULL) { commd_debug(MD_MMV_PROC_M, @@ -1902,7 +1914,7 @@ free(ret); } - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); /* Free all submessages, if there were any */ if (nmsgs > 1) { for (curmsg = 0; curmsg < nmsgs; curmsg++) { @@ -1912,9 +1924,9 @@ /* Free the result */ free_result(result); - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); mdmn_mark_class_unbusy(setno, orig_class); - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); /* @@ -1960,9 +1972,9 @@ sender = msg->msg_sender; /* this is always the master of the set */ msgtype = msg->msg_type; - rw_rdlock(&set_desc_rwlock[setno]); + (void) rw_rdlock(&set_desc_rwlock[setno]); whoami = set_descriptor[setno]->sd_mn_mynode->nd_nodeid; - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); result = Zalloc(sizeof (md_mn_result_t)); result->mmr_flags = msg->msg_flags; @@ -1989,7 +2001,7 @@ } else { /* Did we already process this message ? */ - mutex_lock(&mct_mutex[setno][class]); + (void) mutex_lock(&mct_mutex[setno][class]); completed = mdmn_check_completion(msg, result); if (completed == MDMN_MCT_NOT_DONE) { @@ -2005,14 +2017,14 @@ (void) mdmn_mark_completion(msg, NULL, MDMN_MCT_IN_PROGRESS); - mutex_unlock(&mct_mutex[setno][class]); + (void) mutex_unlock(&mct_mutex[setno][class]); (*handler)(msg, MD_MSGF_ON_SLAVE, result); commd_debug(MD_MMV_PROC_S, "proc_sla: finished handler for (%d, 0x%llx-%d)\n", MSGID_ELEMS(msg->msg_msgid)); - mutex_lock(&mct_mutex[setno][class]); + (void) mutex_lock(&mct_mutex[setno][class]); /* Mark the message as fully done, store the result */ (void) mdmn_mark_completion(msg, result, MDMN_MCT_DONE); @@ -2028,7 +2040,7 @@ * This will be done by the initial message handling * thread */ - mutex_unlock(&mct_mutex[setno][class]); + (void) mutex_unlock(&mct_mutex[setno][class]); commd_debug(MD_MMV_PROC_M, "proc_sla: " "(%d, 0x%llx-%d) is currently being processed\n", MSGID_ELEMS(msg->msg_msgid), msgtype); @@ -2043,20 +2055,20 @@ "proc_sla: MCT error for (%d, 0x%llx-%d)\n", MSGID_ELEMS(msg->msg_msgid)); } - mutex_unlock(&mct_mutex[setno][class]); + (void) mutex_unlock(&mct_mutex[setno][class]); } /* * At this point we have a result (even in an error case) * that we return to the master. */ - rw_rdlock(&set_desc_rwlock[setno]); + (void) rw_rdlock(&set_desc_rwlock[setno]); retries = 2; /* we will try two times to send the results */ successfully_returned = 0; while (!successfully_returned && (retries != 0)) { ret = (int *)NULL; - rw_rdlock(&client_rwlock[setno]); + (void) rw_rdlock(&client_rwlock[setno]); if (check_client(setno, sender)) { /* * If we cannot setup the rpc connection to the master, @@ -2064,7 +2076,7 @@ */ commd_debug(MD_MMV_SYSLOG, "proc_mas: unable to create client for master\n"); - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); break; } else { ret = mdmn_wakeup_master_2(result, @@ -2083,13 +2095,13 @@ commd_debug(MD_MMV_PROC_S, "proc_sla: wakeup_master returned NULL\n"); /* release reader lock, grab writer lock */ - rw_unlock(&client_rwlock[setno]); - rw_wrlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); + (void) rw_wrlock(&client_rwlock[setno]); mdmn_clnt_destroy(client[setno][sender]); if (client[setno][sender] != (CLIENT *)NULL) { client[setno][sender] = (CLIENT *)NULL; } - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); retries--; commd_debug(MD_MMV_PROC_S, "retries = %d\n", retries); @@ -2098,16 +2110,16 @@ if (*ret != MDMNE_ACK) { commd_debug(MD_MMV_PROC_S, "proc_sla: " "wakeup_master returned %d\n", *ret); - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); break; } else { /* Good case */ successfully_returned = 1; - rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); } } } - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); commd_debug(MD_MMV_PROC_S, "proc_sla: done (%d, 0x%llx-%d)\n", MSGID_ELEMS(msg->msg_msgid)); @@ -2226,11 +2238,11 @@ if (md_mn_set_inited[setno] != MDMN_SET_READY) { /* Can only use the appropriate mutexes if they are inited */ if (md_mn_set_inited[setno] & MDMN_SET_MUTEXES) { - rw_wrlock(&set_desc_rwlock[setno]); - rw_wrlock(&client_rwlock[setno]); + (void) rw_wrlock(&set_desc_rwlock[setno]); + (void) rw_wrlock(&client_rwlock[setno]); err = mdmn_init_set(setno, MDMN_SET_READY); - rw_unlock(&client_rwlock[setno]); - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); } else { err = mdmn_init_set(setno, MDMN_SET_READY); } @@ -2249,10 +2261,10 @@ } } - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); if ((mdmn_is_class_suspended(setno, class) == TRUE) && ((msg->msg_flags & MD_MSGF_OVERRIDE_SUSPEND) == 0)) { - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); resultp = Zalloc(sizeof (md_mn_result_t)); resultp->mmr_comm_state = MDMNE_SUSPENDED; mdmn_svc_sendreply(transp, xdr_md_mn_result_t, (char *)resultp); @@ -2264,7 +2276,7 @@ setno, class, msg->msg_type); return (0); } - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); /* is this rpc request coming from the local node? */ if (check_license(rqstp, 0) == FALSE) { @@ -2293,8 +2305,8 @@ * Make it a detached thread because it will not communicate with * anybody thru thr_* mechanisms */ - thr_create(NULL, 0, mdmn_send_to_work, (void *) matp, THR_DETACHED, - NULL); + (void) thr_create(NULL, 0, mdmn_send_to_work, (void *) matp, + THR_DETACHED, NULL); commd_debug(MD_MMV_SEND, "send: done (%d, 0x%llx-%d)\n", MSGID_ELEMS(msg->msg_msgid)); @@ -2352,11 +2364,11 @@ if (md_mn_set_inited[setno] != MDMN_SET_READY) { /* Can only use the appropriate mutexes if they are inited */ if (md_mn_set_inited[setno] & MDMN_SET_MUTEXES) { - rw_wrlock(&set_desc_rwlock[setno]); - rw_wrlock(&client_rwlock[setno]); + (void) rw_wrlock(&set_desc_rwlock[setno]); + (void) rw_wrlock(&client_rwlock[setno]); err = mdmn_init_set(setno, MDMN_SET_READY); - rw_unlock(&client_rwlock[setno]); - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); } else { err = mdmn_init_set(setno, MDMN_SET_READY); } @@ -2392,29 +2404,29 @@ __savetime = gethrtime(); } - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); /* check if class is locked via a call to mdmn_comm_lock_svc_2 */ if (mdmn_is_class_locked(setno, class) == TRUE) { - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); *retval = MDMNE_CLASS_LOCKED; free_msg(msg); return (retval); } - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); /* Check if the class is busy right now. Do it only on the master */ - rw_rdlock(&set_desc_rwlock[setno]); + (void) rw_rdlock(&set_desc_rwlock[setno]); if (set_descriptor[setno]->sd_mn_am_i_master) { - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); /* * If the class is currently suspended, don't accept new * messages, unless they are flagged with an override bit. */ - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); if ((mdmn_is_class_suspended(setno, class) == TRUE) && ((msg->msg_flags & MD_MSGF_OVERRIDE_SUSPEND) == 0)) { - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); *retval = MDMNE_SUSPENDED; commd_debug(MD_MMV_SEND, "send: set %d is suspended\n", setno); @@ -2422,12 +2434,12 @@ return (retval); } if (mdmn_mark_class_busy(setno, class) == FALSE) { - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); *retval = MDMNE_CLASS_BUSY; free_msg(msg); return (retval); } - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); /* * Because the real processing of the message takes time we * create a thread for it. So the master thread can continue @@ -2437,7 +2449,7 @@ (void *(*)(void *))mdmn_master_process_msg, (void *)msg, THR_DETACHED|THR_SUSPENDED, &tid); } else { - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); *retval = thr_create(NULL, 0, (void *(*)(void *)) mdmn_slave_process_msg, (void *)msg, THR_DETACHED|THR_SUSPENDED, &tid); @@ -2450,7 +2462,7 @@ } /* Now run the new thread */ - thr_continue(tid); + (void) thr_continue(tid); commd_debug(MD_MMV_WORK, "work: done (%d, 0x%llx-%d), set=%d, class=%d, type=%d\n", @@ -2486,11 +2498,11 @@ /* set not ready means we just crashed are restarted now */ /* Can only use the appropriate mutexes if they are inited */ if (md_mn_set_inited[setno] & MDMN_SET_MUTEXES) { - rw_wrlock(&set_desc_rwlock[setno]); - rw_wrlock(&client_rwlock[setno]); + (void) rw_wrlock(&set_desc_rwlock[setno]); + (void) rw_wrlock(&client_rwlock[setno]); err = mdmn_init_set(setno, MDMN_SET_READY); - rw_unlock(&client_rwlock[setno]); - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); } else { err = mdmn_init_set(setno, MDMN_SET_READY); } @@ -2517,7 +2529,7 @@ "wake_ini: received (%d, 0x%llx-%d) set=%d, class=%d, type=%d\n", MSGID_ELEMS(res->mmr_msgid), setno, class, res->mmr_msgtype); - mutex_lock(mx); + (void) mutex_lock(mx); /* * Search the initiator wakeup table. @@ -2543,9 +2555,9 @@ MSGID_ELEMS(res->mmr_msgid)); *retval = MDMNE_NO_WAKEUP_ENTRY; } - mutex_unlock(mx); + (void) mutex_unlock(mx); /* less work for check_timeouts */ - mutex_lock(&check_timeout_mutex); + (void) mutex_lock(&check_timeout_mutex); if (messages_on_their_way == 0) { commd_debug(MD_MMV_WAKE_I, "Oops, messages_on_their_way < 0 (%d, 0x%llx-%d)\n", @@ -2553,7 +2565,7 @@ } else { messages_on_their_way--; } - mutex_unlock(&check_timeout_mutex); + (void) mutex_unlock(&check_timeout_mutex); xdr_free(xdr_md_mn_result_t, (caddr_t)res); return (retval); @@ -2596,11 +2608,11 @@ /* set not ready means we just crashed are restarted now */ /* Can only use the appropriate mutexes if they are inited */ if (md_mn_set_inited[setno] & MDMN_SET_MUTEXES) { - rw_wrlock(&set_desc_rwlock[setno]); - rw_wrlock(&client_rwlock[setno]); + (void) rw_wrlock(&set_desc_rwlock[setno]); + (void) rw_wrlock(&client_rwlock[setno]); err = mdmn_init_set(setno, MDMN_SET_READY); - rw_unlock(&client_rwlock[setno]); - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); } else { err = mdmn_init_set(setno, MDMN_SET_READY); } @@ -2639,14 +2651,14 @@ * We store the results in the appropriate slot and * wakeup the thread (mdmn_master_process_msg()) waiting for them. */ - mutex_lock(mx); + (void) mutex_lock(mx); mdmn_get_master_table_id(setno, class, &master_table_id); sender = mdmn_get_master_table_addr(setno, class); if (MSGID_CMP(&(master_table_id), &(res->mmr_msgid))) { if (sender == res->mmr_sender) { mdmn_set_master_table_res(setno, class, res); - cond_signal(cv); + (void) cond_signal(cv); *retval = MDMNE_ACK; } else { /* id is correct but wrong sender (I smell a timeout) */ @@ -2668,7 +2680,7 @@ *retval = MDMNE_NO_WAKEUP_ENTRY; } - mutex_unlock(mx); + (void) mutex_unlock(mx); return (retval); } @@ -2727,7 +2739,7 @@ } commd_debug(MD_MMV_MISC, "lock: set=%d, class=%d\n", setno, class); - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); if (class != MD_MSG_CLASS0) { mdmn_mark_class_locked(setno, class); } else { @@ -2736,7 +2748,7 @@ mdmn_mark_class_locked(setno, class); } } - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); *retval = MDMNE_ACK; return (retval); @@ -2783,7 +2795,7 @@ } commd_debug(MD_MMV_MISC, "unlock: set=%d, class=%d\n", setno, class); - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); if (class != MD_MSG_CLASS0) { mdmn_mark_class_unlocked(setno, class); } else { @@ -2792,7 +2804,7 @@ mdmn_mark_class_unlocked(setno, class); } } - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); *retval = MDMNE_ACK; return (retval); @@ -2896,7 +2908,7 @@ (void) mdmn_init_set(setno, MDMN_SET_MUTEXES); } - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); /* shall we drain all classes of this set? */ if (oclass == MD_COMM_ALL_CLASSES) { for (class = 1; class < MD_MN_NCLASSES; class ++) { @@ -2920,7 +2932,7 @@ failure++; } } - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); } /* If one or more sets are not entirely drained, failure is non-zero */ if (failure != 0) { @@ -3012,7 +3024,7 @@ (void) mdmn_init_set(setno, MDMN_SET_MUTEXES); } - mutex_lock(&mdmn_busy_mutex[setno]); + (void) mutex_lock(&mdmn_busy_mutex[setno]); if (oclass == MD_COMM_ALL_CLASSES) { int end_class = 1; @@ -3054,7 +3066,7 @@ mdmn_mark_class_resumed(setno, oclass, MDMN_SUSPEND_1); } - mutex_unlock(&mdmn_busy_mutex[setno]); + (void) mutex_unlock(&mdmn_busy_mutex[setno]); } *retval = MDMNE_ACK; @@ -3084,14 +3096,14 @@ commd_debug(MD_MMV_MISC, "reinit: set=%d\n", setno); - rw_rdlock(&set_desc_rwlock[setno]); + (void) rw_rdlock(&set_desc_rwlock[setno]); /* * We assume, that all messages have been suspended previously. * * As we are modifying lots of clients here we grab the client_rwlock * in writer mode. This ensures, no new messages come in. */ - rw_wrlock(&client_rwlock[setno]); + (void) rw_wrlock(&client_rwlock[setno]); /* This set is no longer initialized */ if ((set_descriptor[setno] != NULL) && @@ -3120,8 +3132,8 @@ commd_debug(MD_MMV_MISC, "reinit: done init_set(%d)\n", setno); - rw_unlock(&client_rwlock[setno]); - rw_unlock(&set_desc_rwlock[setno]); + (void) rw_unlock(&client_rwlock[setno]); + (void) rw_unlock(&set_desc_rwlock[setno]); *retval = MDMNE_ACK; return (retval); }
--- a/usr/src/cmd/lvm/rpc.mdcommd/mdmn_commd_service.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/rpc.mdcommd/mdmn_commd_service.c Wed Nov 11 21:59:42 2009 -0800 @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -329,7 +329,7 @@ exit(1); } - atexit(exit_commd); + (void) atexit(exit_commd); if (pmclose) { (void) signal(SIGALRM, (void(*)()) closedown); @@ -360,7 +360,7 @@ closefrom(0); else { rl.rlim_max = 0; - getrlimit(RLIMIT_NOFILE, &rl); + (void) getrlimit(RLIMIT_NOFILE, &rl); if ((size = rl.rlim_max) == 0) exit(1); for (i = 0; i < size; i++) @@ -369,7 +369,7 @@ i = open("/dev/null", 2); (void) dup2(i, 1); (void) dup2(i, 2); - setsid(); + (void) setsid(); openlog("mdmn_commd", LOG_PID, LOG_DAEMON); #endif } @@ -378,7 +378,7 @@ exit(1); } - atexit(exit_commd); + (void) atexit(exit_commd); (void) metaioctl(MD_MN_SET_COMMD_RUNNING, (void *)1, &ep, "rpc.mdcommd");
--- a/usr/src/cmd/lvm/rpc.mdcommd/mdmn_subr.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/rpc.mdcommd/mdmn_subr.c Wed Nov 11 21:59:42 2009 -0800 @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -113,7 +113,7 @@ commd_debug(MD_MMV_MISC, "unbusy: set=%d, class=%d\n", setno, class); mdmn_busy[setno][class] &= ~MDMN_BUSY; /* something changed, inform threads waiting for that */ - cond_signal(&mdmn_busy_cv[setno]); + (void) cond_signal(&mdmn_busy_cv[setno]); if ((mdmn_busy[setno][class] & MDMN_SUSPEND_ALL) == 0) { return; @@ -410,7 +410,7 @@ /* Are timestamps activated ? */ if (md_commd_global_verb & MD_MMV_TIMESTAMP) { /* print time since last TRESET in usecs */ - fprintf(commdout, "[%s]", + (void) fprintf(commdout, "[%s]", meta_print_hrtime(gethrtime() - __savetime)); } /* Now print the real message */ @@ -559,7 +559,7 @@ } offset_in_page = (uint_t)(caddr_t)mce % sysconf(_SC_PAGESIZE); - memset(mce, 0, sizeof (md_mn_mce_t)); + (void) memset(mce, 0, sizeof (md_mn_mce_t)); MSGID_COPY(&msg->msg_msgid, &mce->mce_result.mmr_msgid); if (flag == MDMN_MCT_IN_PROGRESS) { @@ -593,14 +593,14 @@ /* if mmr_exitval is zero, we store stdout, otherwise stderr */ if (result->mmr_exitval == 0) { if (result->mmr_out_size > 0) { - memcpy(mce->mce_data, result->mmr_out, + (void) memcpy(mce->mce_data, result->mmr_out, result->mmr_out_size); mce->mce_result.mmr_out_size = result->mmr_out_size; } } else { if (result->mmr_err_size > 0) { mce->mce_result.mmr_err_size = result->mmr_err_size; - memcpy(mce->mce_data, result->mmr_err, + (void) memcpy(mce->mce_data, result->mmr_err, result->mmr_err_size); } } @@ -609,7 +609,7 @@ mmc_out: /* now flush this entry to disk */ - msync((caddr_t)mce - offset_in_page, + (void) msync((caddr_t)mce - offset_in_page, sizeof (md_mn_mce_t) + offset_in_page, MS_SYNC); return (MDMN_MCT_DONE); } @@ -683,12 +683,14 @@ if (result->mmr_exitval == 0) { if (outsize != 0) { result->mmr_out = Zalloc(outsize); - memcpy(result->mmr_out, mce->mce_data, outsize); + (void) memcpy(result->mmr_out, mce->mce_data, + outsize); } } else { if (errsize != 0) { result->mmr_err = Zalloc(errsize); - memcpy(result->mmr_err, mce->mce_data, errsize); + (void) memcpy(result->mmr_err, mce->mce_data, + errsize); } } commd_debug(MD_MMV_MISC,
--- a/usr/src/cmd/lvm/rpc.metad/metad_init.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/rpc.metad/metad_init.c Wed Nov 11 21:59:42 2009 -0800 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 1999-2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "metad_local.h" #include <metad.h> @@ -182,19 +179,19 @@ return (0); /* single thread (not really needed if daemon stays single threaded) */ - mutex_lock(&mx); + (void) mutex_lock(&mx); /* check for remote root or METAD_GID */ /*LINTED*/ sys_credp = (struct authsys_parms *)rqstp->rq_clntcred; if ((check_gid14(sys_credp->aup_uid) == 0) || (check_host(rqstp) == 0)) { - mutex_unlock(&mx); + (void) mutex_unlock(&mx); return (0); } /* return failure */ - mutex_unlock(&mx); + (void) mutex_unlock(&mx); return (mdsyserror(ep, EACCES, "rpc.metad")); } @@ -214,7 +211,7 @@ SVCXPRT *transp; if (sdssc_bind_library() == SDSSC_ERROR) { - mdsyserror(ep, EACCES, "can't bind to cluster library"); + (void) mdsyserror(ep, EACCES, "can't bind to cluster library"); return (1); }
--- a/usr/src/cmd/lvm/rpc.metad/metad_svc_subr.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/rpc.metad/metad_svc_subr.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "metad_local.h" #include <metad.h> #include <sys/lvm/md_mddb.h> @@ -1396,7 +1394,7 @@ mnsr->sr_flags |= MD_SR_ADD; mnsr->sr_flags |= MD_SR_MN; - strcpy(mnsr->sr_master_nodenm, master_nodenm); + (void) strcpy(mnsr->sr_master_nodenm, master_nodenm); mnsr->sr_master_nodeid = master_nodeid; mnsr->sr_mhiargs = defmhiargs; @@ -2967,7 +2965,7 @@ if (MD_MNSET_REC(sr)) { mnsr = (struct md_mnset_record *)sr; - strlcpy(mnsr->sr_master_nodenm, master_nodenm, + (void) strlcpy(mnsr->sr_master_nodenm, master_nodenm, MD_MAX_NODENAME); mnsr->sr_master_nodeid = master_nodeid; if (master_nodeid != 0) { @@ -3068,7 +3066,7 @@ * mddoors itself takes care there will be * only one instance running, so starting it twice won't hurt */ - pclose(popen(MDDOORS, "w")); + (void) pclose(popen(MDDOORS, "w")); /* * Get latest copy of data. If a drive was just added causing @@ -3136,7 +3134,7 @@ mbp.c_blk_flags = MDDB_BLOCK_PARSE; if (metaioctl(MD_MN_MDDB_BLOCK, &mbp, &mbp.c_mde, NULL)) { - mdstealerror(&xep, &mbp.c_mde); + (void) mdstealerror(&xep, &mbp.c_mde); mde_perror(ep, gettext( "Could not block set %s"), sp->setname); @@ -3160,7 +3158,7 @@ */ if (mdisok(ep) || mdismddberror(ep, MDE_DB_ACCOK)) { - mdstealerror(ep, &xep); + (void) mdstealerror(ep, &xep); } } } @@ -5004,7 +5002,7 @@ return (TRUE); if (metaioctl(MD_DB_GETDEV, &c, &c.c_mde, NULL) != 0) { - mdstealerror(ep, &c.c_mde); + (void) mdstealerror(ep, &c.c_mde); return (TRUE); } @@ -5550,7 +5548,7 @@ /* * Need to invoke a metasync on a node newly added to a set. */ - meta_mn_mirror_resync_all(&(setno_args->setno)); + (void) meta_mn_mirror_resync_all(&(setno_args->setno)); err = svc_fini(ep); return (TRUE); @@ -5587,7 +5585,7 @@ return (TRUE); setno_args = &args->mdrpc_setno_2_args_u.rev1; - meta_mn_sp_update_abr(&(setno_args->setno)); + (void) meta_mn_sp_update_abr(&(setno_args->setno)); err = svc_fini(ep); return (TRUE);
--- a/usr/src/cmd/lvm/rpc.metamhd/mhd_drive.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/rpc.metamhd/mhd_drive.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -616,7 +616,7 @@ { struct pln_cache *p, *n = NULL; - mutex_lock(&mhd_pln_mx); + (void) mutex_lock(&mhd_pln_mx); for (p = pln_cache_anchor; p != NULL; p = n) { n = p->next; Free(p->pln_name); @@ -624,7 +624,7 @@ } pln_cache_anchor = NULL; - mutex_unlock(&mhd_pln_mx); + (void) mutex_unlock(&mhd_pln_mx); } /* @@ -648,9 +648,9 @@ if ((pln_ctlr_name = get_pln_ctlr_name(path)) == NULL) return; - mutex_lock(&mhd_pln_mx); + (void) mutex_lock(&mhd_pln_mx); if (find_pln_cache(pln_ctlr_name, &ctype) == 1) { - mutex_unlock(&mhd_pln_mx); + (void) mutex_unlock(&mhd_pln_mx); if (ctype != MHD_CTLR_SSA200) return; @@ -661,7 +661,7 @@ } if ((fd = open(pln_ctlr_name, (O_RDONLY|O_NDELAY), 0)) < 0) { - mutex_unlock(&mhd_pln_mx); + (void) mutex_unlock(&mhd_pln_mx); Free(pln_ctlr_name); return; } @@ -678,7 +678,7 @@ ucmd.uscsi_flags = USCSI_READ | USCSI_ISOLATE | USCSI_DIAGNOSE; ucmd.uscsi_timeout = 30; if (ioctl(fd, USCSICMD, &ucmd)) { - mutex_unlock(&mhd_pln_mx); + (void) mutex_unlock(&mhd_pln_mx); (void) close(fd); MHDPRINTF(("%s: USCSICMD(SCMD_INQUIRY): failed errno %d\n", pln_ctlr_name, errno)); @@ -708,7 +708,7 @@ out: add_pln_cache(pln_ctlr_name, cinfop->mhc_ctype); - mutex_unlock(&mhd_pln_mx); + (void) mutex_unlock(&mhd_pln_mx); } /*
--- a/usr/src/cmd/lvm/rpc.metamhd/mhd_init.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/rpc.metamhd/mhd_init.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "mhd_local.h" #include <grp.h> @@ -296,19 +294,19 @@ return (0); /* single thread (not really needed if daemon stays single threaded) */ - mutex_lock(&mx); + (void) mutex_lock(&mx); /* check for remote root or METAMHD_GID */ /*LINTED*/ sys_credp = (struct authsys_parms *)rqstp->rq_clntcred; if ((check_gid14(sys_credp->aup_uid) == 0) || (check_host(rqstp) == 0)) { - mutex_unlock(&mx); + (void) mutex_unlock(&mx); return (0); } /* return failure */ - mutex_unlock(&mx); + (void) mutex_unlock(&mx); return (mhd_error(mhep, EACCES, myname)); }
--- a/usr/src/cmd/lvm/util/metaclust.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/util/metaclust.c Wed Nov 11 21:59:42 2009 -0800 @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -160,7 +160,7 @@ * - signal sent but child not killed * - waitpid failed/interrupted */ - sleep(2); + (void) sleep(2); while ((ret = waitpid(c_pid, &stat_loc, WNOHANG)) < 0) { if (errno != EINTR) { break; @@ -633,7 +633,7 @@ "\t%s [-V | -? | -h]\n"), myname, myname, myname, myname); if (!eval) { - fprintf(stderr, gettext("\n" + (void) fprintf(stderr, gettext("\n" "\tValid debug (-d) levels are 1-%d for increasing " "verbosity.\n\tDefault is -d 3.\n\n" "\tValid step values are: return | step1 | step2 | " @@ -754,13 +754,13 @@ } else if (optopt == 'V') { int i; - fprintf(stdout, gettext( + (void) fprintf(stdout, gettext( "%s: Versions Supported:"), myname); for (i = 0; i < version_table_size; i++) { - fprintf(stdout, " %s", + (void) fprintf(stdout, " %s", version_table[i]); } - fprintf(stdout, "\n"); + (void) fprintf(stdout, "\n"); md_exit(sp, 0); } /*FALLTHROUGH*/ @@ -932,7 +932,7 @@ mbp.c_blk_flags = MDDB_BLOCK_PARSE; if (metaioctl(MD_MN_MDDB_BLOCK, &mbp, &mbp.c_mde, NULL)) { - mdstealerror(ep, &mbp.c_mde); + (void) mdstealerror(ep, &mbp.c_mde); mde_perror(ep, gettext("Could not " "block set %s"), sp->setname); md_exit(sp, 1); @@ -943,7 +943,7 @@ while ((ret_val = mdmn_suspend(setno, MD_COMM_ALL_CLASSES, commd_timeout)) == MDE_DS_COMMDCTL_SUSPEND_NYD) { - sleep(1); + (void) sleep(1); } if (ret_val) { @@ -967,7 +967,7 @@ sf.sf_magic = MDDB_SETFLAGS_MAGIC; if (metaioctl(MD_MN_SET_SETFLAGS, &sf, &sf.sf_mde, NULL)) { - mdstealerror(ep, &sf.sf_mde); + (void) mdstealerror(ep, &sf.sf_mde); mde_perror(ep, gettext("Could not set " "start_step flag for set %s"), sp->setname); md_exit(sp, 1); @@ -1138,7 +1138,7 @@ mbp.c_blk_flags = MDDB_BLOCK_PARSE; if (metaioctl(MD_MN_MDDB_BLOCK, &mbp, &mbp.c_mde, NULL)) { - mdstealerror(ep, &mbp.c_mde); + (void) mdstealerror(ep, &mbp.c_mde); mde_perror(ep, gettext("Could not " "block set %s"), sp->setname); md_exit(sp, 1); @@ -1149,7 +1149,7 @@ while ((ret_val = mdmn_suspend(setno, MD_COMM_ALL_CLASSES, commd_timeout)) == MDE_DS_COMMDCTL_SUSPEND_NYD) { - sleep(1); + (void) sleep(1); } if (ret_val) { @@ -1577,7 +1577,7 @@ md_exit(sp, 1); } mdclrerror(ep); - meta_unlock(sp, ep); + (void) meta_unlock(sp, ep); continue; } @@ -1599,7 +1599,7 @@ cfg.c_setno = sp->setno; if (metaioctl(MD_DB_GETDEV, &cfg, &cfg.c_mde, NULL) != 0) { - mdstealerror(ep, &cfg.c_mde); + (void) mdstealerror(ep, &cfg.c_mde); mde_perror(ep, gettext("Could " "not get set %s information"), sp->setname); @@ -1608,7 +1608,7 @@ /* Don't do anything else if set is stale */ if (cfg.c_flags & MDDB_C_STALE) { - meta_unlock(sp, ep); + (void) meta_unlock(sp, ep); mdclrerror(ep); continue; } @@ -1618,7 +1618,7 @@ md_exit(sp, 1); } - meta_unlock(sp, ep); + (void) meta_unlock(sp, ep); meta_mc_log(MC_LOG3, gettext("Step3 - rpc.mdcommd " "re-initialised and mirror owners reset for " @@ -1763,7 +1763,7 @@ cfg.c_setno = sp->setno; if (metaioctl(MD_DB_GETDEV, &cfg, &cfg.c_mde, NULL) != 0) { - mdstealerror(ep, &cfg.c_mde); + (void) mdstealerror(ep, &cfg.c_mde); mde_perror(ep, gettext("Could " "not get set %s information"), sp->setname); @@ -1789,7 +1789,7 @@ mbp.c_blk_flags = MDDB_UNBLOCK_PARSE; if (metaioctl(MD_MN_MDDB_BLOCK, &mbp, &mbp.c_mde, NULL)) { - mdstealerror(ep, &mbp.c_mde); + (void) mdstealerror(ep, &mbp.c_mde); mde_perror(ep, gettext("Could not " "unblock set %s"), sp->setname); md_exit(local_sp, 1); @@ -1844,7 +1844,7 @@ sf.sf_magic = MDDB_SETFLAGS_MAGIC; if (metaioctl(MD_MN_GET_SETFLAGS, &sf, &sf.sf_mde, NULL)) { - mdstealerror(ep, &sf.sf_mde); + (void) mdstealerror(ep, &sf.sf_mde); mde_perror(ep, gettext("Could not get " "start_step flag for set %s"), sp->setname); md_exit(local_sp, 1); @@ -1868,7 +1868,7 @@ sf.sf_magic = MDDB_SETFLAGS_MAGIC; if (metaioctl(MD_MN_SET_SETFLAGS, &sf, &sf.sf_mde, NULL)) { - mdstealerror(ep, &sf.sf_mde); + (void) mdstealerror(ep, &sf.sf_mde); mde_perror(ep, gettext("Could not reset " "start_step flag for set %s"), @@ -1917,7 +1917,7 @@ sf.sf_magic = MDDB_SETFLAGS_MAGIC; if (metaioctl(MD_MN_SET_SETFLAGS, &sf, &sf.sf_mde, NULL)) { - mdstealerror(ep, &sf.sf_mde); + (void) mdstealerror(ep, &sf.sf_mde); mde_perror(ep, gettext("Could not set " "submirror state flag for set %s"), @@ -1935,7 +1935,7 @@ md_exit(local_sp, 1); } meta_mirror_resync_unblock(sp); - meta_unlock(sp, ep); + (void) meta_unlock(sp, ep); continue; } @@ -1976,7 +1976,7 @@ md_exit(local_sp, 1); } meta_mirror_resync_unblock(sp); - meta_unlock(sp, ep); + (void) meta_unlock(sp, ep); /* resync all mirrors in set */ if (meta_mirror_resync_all(sp, 0, ep) != 0) {
--- a/usr/src/cmd/lvm/util/metadevadm.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/util/metadevadm.c Wed Nov 11 21:59:42 2009 -0800 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <stdarg.h> #include <ctype.h> @@ -47,10 +44,10 @@ usage(char *myname) { (void) fprintf(stderr, gettext( -"usage: %s -h\n" -" %s [-s setname] -r [-lnv]\n" -" %s [-s setname] -u cxtxdx [-lnv]\n"), - myname, myname, myname); + "usage: %s -h\n" + " %s [-s setname] -r [-lnv]\n" + " %s [-s setname] -u cxtxdx [-lnv]\n"), + myname, myname, myname); } int @@ -83,15 +80,15 @@ (void) textdomain(TEXT_DOMAIN); if ((sdssc_bind_library() == SDSSC_OKAY) && - (sdssc_cmd_proxy(argc, argv, SDSSC_PROXY_PRIMARY, - &error) == SDSSC_PROXY_DONE)) - exit(error); + (sdssc_cmd_proxy(argc, argv, SDSSC_PROXY_PRIMARY, + &error) == SDSSC_PROXY_DONE)) + exit(error); openlog("metadevadm", LOG_ODELAY, LOG_USER); /* initialize */ if (md_init(argc, argv, 0, 1, ep) != 0 || - meta_check_root(ep) != 0) { + meta_check_root(ep) != 0) { closelog(); mde_perror(ep, ""); md_exit(sp, 1); @@ -149,7 +146,7 @@ md_exit(sp, 1); } if (MD_MNSET_DESC(sd)) { - printf("%s\n", gettext("metadevadm cannot be " + (void) printf("%s\n", gettext("metadevadm cannot be " "run on multi-owner disksets\n")); closelog(); md_exit(sp, 0);
--- a/usr/src/cmd/lvm/util/metaimport.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/util/metaimport.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Utility to import SVM disksets into an active SVM configuration. */ @@ -255,8 +253,8 @@ continue; } (void) close(fd); - fprintf(stdout, " %s ", d->mid_dnp->cname); - (void) fprintf(stdout, "%s: %s\n", + (void) fprintf(stdout, " %s ", d->mid_dnp->cname); + (void) fprintf(stdout, "%s: %s\n", gettext(" - must import with set " "created at "), meta_print_time((md_timeval32_t *) (&(mbp->mb_setcreatetime)))); @@ -339,8 +337,8 @@ /* is the current drive on the skip list? */ for (slp = *skiph; slp != NULL; slp = slp->next) { - if (dp->drivenamep == slp->drivenamep) - break; + if (dp->drivenamep == slp->drivenamep) + break; } /* drive on the skip list ? */ if (slp != NULL) @@ -369,7 +367,8 @@ * Go to the tail for the current set */ for (p = *mispp; p->mis_next != NULL; - p = p->mis_next); + p = p->mis_next) + ; /* * Now look for the set creation timestamp. @@ -418,7 +417,7 @@ } skipt = meta_drivenamelist_append_wrapper( - skipt, d->mid_dnp); + skipt, d->mid_dnp); } } } @@ -476,7 +475,7 @@ * in a SunCluster environment. */ if (sdssc_bind_library() != SDSSC_NOT_BOUND) { - printf(gettext( + (void) printf(gettext( "%s: Import operation not supported under SunCluster\n"), argv[0]); exit(0); @@ -628,12 +627,12 @@ dlist = Malloc(sizecnt); - strlcpy(dlist, ip->drive, sizecnt); + (void) strlcpy(dlist, ip->drive, sizecnt); Free(ip->drive); for (dp = dnlp->next; dp != NULL; dp = dp->next) { - strlcat(dlist, ", ", sizecnt); - strlcat(dlist, dp->drivenamep->cname, sizecnt); + (void) strlcat(dlist, ", ", sizecnt); + (void) strlcat(dlist, dp->drivenamep->cname, sizecnt); } ip->drive = dlist; @@ -812,14 +811,14 @@ * this type of set until the offending disk(s) are turned * off to prevent data corruption. */ - printf(gettext("To import this set, ")); + (void) printf(gettext("To import this set, ")); for (d = pass1_misp->mis_drives; d != NULL; d = d->mid_next) { if (d->overlapped_disk) - printf("%s ", d->mid_dnp->cname); + (void) printf("%s ", d->mid_dnp->cname); } - printf(gettext("must be removed from the system\n")); + (void) printf(gettext("must be removed from the system\n")); meta_free_im_set_desc(misp); md_exit(sp, 1); }
--- a/usr/src/cmd/lvm/util/metarecover.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/util/metarecover.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Recover metadevice configurations that have been lost by scanning * media, intelligent guessing, or other means. @@ -82,13 +80,13 @@ (void) textdomain(TEXT_DOMAIN); if (sdssc_bind_library() == SDSSC_ERROR) { - printf(gettext( + (void) printf(gettext( "%s: Interface error with libsds_sc.so\n"), argv[0]); exit(1); } if (md_init(argc, argv, 0, 1, ep) != 0 || - meta_check_root(ep) != 0) { + meta_check_root(ep) != 0) { mde_perror(ep, ""); md_exit((mdsetname_t *)NULL, 1); } @@ -167,8 +165,8 @@ if (!metaismeta(namep)) { if (! meta_is_drive_in_thisset(sp, namep->drivenamep, FALSE, ep)) { - mddeverror(ep, MDE_NOT_IN_SET, namep->dev, - namep->cname); + (void) mddeverror(ep, MDE_NOT_IN_SET, + namep->dev, namep->cname); mde_perror(ep, ""); md_exit(sp, 1); }
--- a/usr/src/cmd/lvm/util/metaset.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/util/metaset.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Metadevice diskset utility. */ @@ -313,7 +311,7 @@ static void printclusterversion() { - printf("%s\n", METASETIFVERSION); + (void) printf("%s\n", METASETIFVERSION); } /* @@ -549,7 +547,7 @@ sdssc_rval = sdssc_mo_create_begin(sname, argc, argv, SDSSC_PICK_SETNO); if (sdssc_rval == SDSSC_NOT_BOUND_ERROR) { - mderror(ep, MDE_NOT_MN, NULL); + (void) mderror(ep, MDE_NOT_MN, NULL); mde_perror(ep, "Cluster node does not support " "multi-owner diskset operations"); @@ -831,8 +829,8 @@ */ if ((!multi_node) && (sdssc_notify_service(sname, Make_Primary) == SDSSC_ERROR)) { - meta_set_release(sp, ep); - printf(gettext( + (void) meta_set_release(sp, ep); + (void) printf(gettext( "Sun Clustering failed to make set primary\n")); } @@ -1434,7 +1432,7 @@ if (argc > 0) usage(sp, gettext("too many args")); - memset(&vers, 0, sizeof (vers)); + (void) memset(&vers, 0, sizeof (vers)); if ((sdssc_version(&vers) == SDSSC_OKAY) && (vers.major == 3) && @@ -1449,7 +1447,7 @@ */ rval = sdssc_notify_service(sname, Release_Primary); if (rval == SDSSC_ERROR) { - printf(gettext( + (void) printf(gettext( "metaset: failed to notify DCS of release\n")); } md_exit(NULL, rval == SDSSC_ERROR); @@ -1606,7 +1604,7 @@ } } - memset(&vers, 0, sizeof (vers)); + (void) memset(&vers, 0, sizeof (vers)); if ((sdssc_version(&vers) == SDSSC_OKAY) && (vers.major == 3) && @@ -1620,7 +1618,7 @@ */ if ((rval = sdssc_notify_service(sname, Make_Primary)) == SDSSC_ERROR) { - printf(gettext( + (void) printf(gettext( "metaset: failed to notify DCS of take\n")); } md_exit(NULL, rval == SDSSC_ERROR); @@ -2181,13 +2179,13 @@ } if ((new_argv = calloc(argc, sizeof (char *))) == NULL) { - printf(gettext("Out of memory\n")); + (void) printf(gettext("Out of memory\n")); md_exit(sp, 1); } np = new_argv; new_argc = 0; - memset(primary_node, '\0', SDSSC_NODE_NAME_LEN); + (void) memset(primary_node, '\0', SDSSC_NODE_NAME_LEN); for (x = 0; x < argc; x++) { if (strcmp(argv[x], "-C") == 0) { @@ -2223,7 +2221,7 @@ primary_node, &error) == SDSSC_PROXY_DONE) { md_exit(sp, error); } else { - printf(gettext( + (void) printf(gettext( "Couldn't proxy command\n")); md_exit(sp, 1); } @@ -2275,7 +2273,7 @@ sdssc_res = sdssc_bind_library(); if (sdssc_res == SDSSC_ERROR) { - printf(gettext( + (void) printf(gettext( "%s: Interface error with libsds_sc.so\n"), argv[0]); exit(1); } @@ -2517,7 +2515,7 @@ (void) strlcpy(primary_node, hostname, SDSSC_NODE_NAME_LEN); } else { - memset(primary_node, '\0', + (void) memset(primary_node, '\0', SDSSC_NODE_NAME_LEN); } break; @@ -2567,7 +2565,7 @@ * mddoors itself takes care there will be only one * instance running, so starting it twice won't hurt */ - pclose(popen("/usr/lib/lvm/mddoors", "w")); + (void) pclose(popen("/usr/lib/lvm/mddoors", "w")); parse_joinset(argc, argv); /*NOTREACHED*/ } @@ -2606,7 +2604,7 @@ * only one instance running, so starting it twice won't hurt */ if (multi_node) { - pclose(popen("/usr/lib/lvm/mddoors", "w")); + (void) pclose(popen("/usr/lib/lvm/mddoors", "w")); } parse_add(argc, argv);
--- a/usr/src/cmd/lvm/util/metastat.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/lvm/util/metastat.c Wed Nov 11 21:59:42 2009 -0800 @@ -222,7 +222,7 @@ if (metaioctl(MD_DB_GETDEV, &c, &c.c_mde, NULL) != 0) { if (mdismddberror(&c.c_mde, MDE_DB_INVALID)) - mdstealerror(ep, &c.c_mde); + (void) mdstealerror(ep, &c.c_mde); return (-1); } @@ -237,13 +237,14 @@ print_trans_msg(mdprtopts_t options, int meta_print_trans_msg) { if (meta_print_trans_msg != 0) { - fprintf(stderr, "\n\n"); + (void) fprintf(stderr, "\n\n"); if (options & PRINT_SHORT) { - fprintf(stderr, gettext(MD_SHORT_EOF_TRANS_MSG)); - fprintf(stderr, gettext(MD_SHORT_EOF_TRANS_WARNING)); + (void) fprintf(stderr, gettext(MD_SHORT_EOF_TRANS_MSG)); + (void) fprintf(stderr, + gettext(MD_SHORT_EOF_TRANS_WARNING)); } else { - fprintf(stderr, gettext(MD_EOF_TRANS_MSG)); - fprintf(stderr, gettext(MD_EOF_TRANS_WARNING)); + (void) fprintf(stderr, gettext(MD_EOF_TRANS_MSG)); + (void) fprintf(stderr, gettext(MD_EOF_TRANS_WARNING)); } } } @@ -381,7 +382,7 @@ argv += optind; if (all_sets_flag && set_flg) { - fprintf(stderr, gettext("metastat: " + (void) fprintf(stderr, gettext("metastat: " "incompatible options: -a and -s\n")); usage(sp, 1); } @@ -396,7 +397,7 @@ if (check_replica_state(sp, ep)) { if (mdismddberror(ep, MDE_DB_STALE)) { - fprintf(stdout, gettext( + (void) fprintf(stdout, gettext( "****\nWARNING: Stale " "state database replicas. Metastat output " "may be inaccurate.\n****\n\n")); @@ -406,7 +407,7 @@ /* if inquire is set. We probe first */ if (inquire) { if (geteuid() != 0) { - fprintf(stderr, gettext("metastat: -i " + (void) fprintf(stderr, gettext("metastat: -i " "option requires super-user privilages\n")); md_exit(sp, 1); } @@ -742,13 +743,13 @@ hsp = &hspp->hotspares.hotspares_val[hsi]; bname = hsp->hsnamep->bname; nlp = NULL; - metanamelist_append(&nlp, hsp->hsnamep); + (void) metanamelist_append(&nlp, hsp->hsnamep); /* print hotspare */ if (hsp->state == HSS_AVAILABLE) { if (hotspare_ok(bname)) continue; - fprintf(stderr, + (void) fprintf(stderr, "NOTICE: Hotspare %s in %s has failed.\n" "\tDeleting %s since it not in use\n\n", bname, hspnp->hspname, bname); @@ -787,7 +788,7 @@ * the minor numbers. */ - memset(&probe_ioc, 0, sizeof (probe_ioc)); + (void) memset(&probe_ioc, 0, sizeof (probe_ioc)); iocp = &probe_ioc; if ((iocp->mnum_list = (uintptr_t)calloc(ndevs, sizeof (minor_t))) @@ -1189,7 +1190,7 @@ if (mdn == NULL) { print_concise_entry(0, nlp->namep->cname, 0, 'p'); - printf("\n"); + (void) printf("\n"); continue; } @@ -1322,7 +1323,7 @@ mdclrerror(&error); if (mdn == NULL) { print_concise_entry(0, nlp->namep->cname, 0, mtype); - printf("\n"); + (void) printf("\n"); continue; }
--- a/usr/src/cmd/mdb/common/kmdb/kctl/kctl_dmod.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/kmdb/kctl/kctl_dmod.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Driver-side functions for loading and unloading dmods. */ @@ -85,7 +83,7 @@ return (0); kobj_close(fd); - strcpy(fullname, modname); + (void) strcpy(fullname, modname); return (1); }
--- a/usr/src/cmd/mdb/common/kmdb/kctl/kctl_mod.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/kmdb/kctl/kctl_mod.c Wed Nov 11 21:59:42 2009 -0800 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Tracking of kernel module loads and unloads */ @@ -98,7 +95,7 @@ kobj_notify_list_t *kn; for (kn = kctl_mod_notifiers; kn->kn_func != NULL; kn++) - kobj_notify_add(kn); + (void) kobj_notify_add(kn); } void @@ -107,5 +104,5 @@ kobj_notify_list_t *kn; for (kn = kctl_mod_notifiers; kn->kn_func != NULL; kn++) - kobj_notify_remove(kn); + (void) kobj_notify_remove(kn); }
--- a/usr/src/cmd/mdb/common/kmdb/kmdb_conf.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/kmdb/kmdb_conf.c Wed Nov 11 21:59:42 2009 -0800 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/isa_defs.h> #include <sys/utsname.h> #include <strings.h> @@ -84,7 +81,7 @@ if ((utsaddr = (struct utsname *)kmdb_kdi_lookup_by_name("unix", "utsname")) == NULL) { warn("'utsname' symbol is missing from kernel\n"); - strcpy(utsp->sysname, "unknown"); + (void) strcpy(utsp->sysname, "unknown"); return; } @@ -112,7 +109,7 @@ return ("unknown"); } - strncpy(plat, plataddr, sizeof (plat)); + (void) strncpy(plat, plataddr, sizeof (plat)); plat[sizeof (plat) - 1] = '\0'; return (plat);
--- a/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c Wed Nov 11 21:59:42 2009 -0800 @@ -690,7 +690,7 @@ struct module *mod; km->km_name = mdb_alloc(strlen(name) + 1, UM_SLEEP); - strcpy(km->km_name, name); + (void) strcpy(km->km_name, name); bcopy(ctlp, &km->km_modctl, sizeof (struct modctl));
--- a/usr/src/cmd/mdb/common/kmdb/kmdb_promif.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/kmdb/kmdb_promif.c Wed Nov 11 21:59:42 2009 -0800 @@ -380,8 +380,8 @@ char *modepname, *modepval; modepname = mdb_alloc(strlen(devname) + 5 + 1, UM_SLEEP); - strcpy(modepname, devname); - strcat(modepname, "-mode"); + (void) strcpy(modepname, devname); + (void) strcat(modepname, "-mode"); modepval = kmdb_prom_get_ddi_prop(kav, modepname);
--- a/usr/src/cmd/mdb/common/kmdb/kmdb_promio.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/kmdb/kmdb_promio.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * PROM I/O backend */ @@ -197,7 +195,7 @@ io = mdb_zalloc(sizeof (mdb_io_t), UM_SLEEP); pdp = mdb_zalloc(sizeof (pio_data_t), UM_SLEEP); - strlcpy(pdp->pio_name, name, MAXPATHLEN); + (void) strlcpy(pdp->pio_name, name, MAXPATHLEN); pdp->pio_fd = hdl; #ifdef __sparc
--- a/usr/src/cmd/mdb/common/mdb/mdb.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/mdb/mdb.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Modular Debugger (MDB) * @@ -1349,14 +1347,14 @@ if ((p = strchr(s, ';')) != NULL) { size_t len = MIN(sizeof (mdb.m_ipathstr) - 1, p - s); - strncpy(mdb.m_ipathstr, s, len); + (void) strncpy(mdb.m_ipathstr, s, len); mdb.m_ipathstr[len] = '\0'; s = p + 1; } if ((p = strchr(s, ';')) != NULL) { size_t len = MIN(sizeof (mdb.m_lpathstr) - 1, p - s); - strncpy(mdb.m_lpathstr, s, len); + (void) strncpy(mdb.m_lpathstr, s, len); mdb.m_lpathstr[len] = '\0'; s = p + 1; }
--- a/usr/src/cmd/mdb/common/mdb/mdb_disasm.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/mdb/mdb_disasm.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <mdb/mdb_disasm_impl.h> #include <mdb/mdb_modapi.h> #include <mdb/mdb_string.h> @@ -286,7 +284,7 @@ len = MIN(buflen, db->db_bufsize - offset); - memcpy(buf, (char *)db->db_buf + offset, len); + (void) memcpy(buf, (char *)db->db_buf + offset, len); db->db_nextaddr = pc + len; return (len);
--- a/usr/src/cmd/mdb/common/mdb/mdb_main.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/mdb/mdb_main.c Wed Nov 11 21:59:42 2009 -0800 @@ -310,7 +310,7 @@ die("failed to stop kmdb"); } - close(fd); + (void) close(fd); } static void
--- a/usr/src/cmd/mdb/common/mdb/mdb_print.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/mdb/mdb_print.c Wed Nov 11 21:59:42 2009 -0800 @@ -531,7 +531,7 @@ (void) mdb_snprintf(tn2, sizeof (tn2), "enum %s", type); if (mdb_ctf_lookup_by_name(tn2, &id) == 0) { - strcpy(type, tn2); + (void) strcpy(type, tn2); } else if (mdb_ctf_lookup_by_name(type, &id) != 0) { mdb_warn("types '%s', '%s'", tn2, type); return (DCMD_ERR);
--- a/usr/src/cmd/mdb/common/mdb/mdb_proc.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/common/mdb/mdb_proc.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -921,7 +921,8 @@ state = mdb_get_config(); envlen = strlen(MDB_CONFIG_ENV_VAR) + 1 + strlen(state) + 1; env = mdb_alloc(envlen, UM_SLEEP); - snprintf(env, envlen, "%s=%s", MDB_CONFIG_ENV_VAR, state); + (void) snprintf(env, envlen, + "%s=%s", MDB_CONFIG_ENV_VAR, state); (void) putenv(env);
--- a/usr/src/cmd/mdb/intel/kmdb/kvm_cpu_p4.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/mdb/intel/kmdb/kvm_cpu_p4.c Wed Nov 11 21:59:42 2009 -0800 @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This plugin supports debugging functionality unique to Intel processors based * on the NetBurst (P4) microarchitecture. It also supports the Pentium M, a @@ -90,11 +88,12 @@ if ((next = mdb_dis_ins2str(mdb.m_disasm, mdb.m_target, MDB_TGT_AS_VIRT, buf, sizeof (buf), addr)) == addr) - strcpy(buf, "???"); + (void) strcpy(buf, "???"); for (c = buf + strlen(buf) - 1; c > buf && (*c == ' ' || *c == '\t'); - c--); + c--) + ; if (*c == '>') { while (c > buf && *c != '<')
--- a/usr/src/cmd/power/conf.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/power/conf.c Wed Nov 11 21:59:42 2009 -0800 @@ -121,9 +121,10 @@ */ if (code == MDEBUG) return; - fprintf(stderr, "%s: ", prog); + (void) fprintf(stderr, "%s: ", prog); if (lineno) - fprintf(stderr, "\"%s\" line %d, ", power_conf, lineno); + (void) fprintf(stderr, + "\"%s\" line %d, ", power_conf, lineno); } va_start(vargs, fmt);
--- a/usr/src/cmd/power/handlers.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/power/handlers.c Wed Nov 11 21:59:42 2009 -0800 @@ -234,8 +234,8 @@ *didyes = 0; - strncpy(yesstr, pm_map(yes), sizeof (yesstr)); - strncpy(nostr, pm_map(no), sizeof (nostr)); + (void) strncpy(yesstr, pm_map(yes), sizeof (yesstr)); + (void) strncpy(nostr, pm_map(no), sizeof (nostr)); mesg(MDEBUG, "S3_helper(%s, %s, %s, %s, %s, %s)\n", whitelist, blacklist, yesstr, nostr, keyword, behavior); if ((kc = kstat_open()) == NULL) { @@ -245,7 +245,7 @@ ksp = kstat_lookup(kc, "acpi", -1, "acpi"); if (ksp == NULL) { mesg(MDEBUG, "kstat_lookup 'acpi', -1, 'acpi' failed\n"); - kstat_close(kc); + (void) kstat_close(kc); return (OKUP); } (void) kstat_read(kc, ksp, NULL); @@ -254,7 +254,7 @@ mesg(MDEBUG, "kstat_data_lookup 'S3' fails\n"); if (dp != NULL) mesg(MDEBUG, "value.l %lx\n", dp->value.l); - kstat_close(kc); + (void) kstat_close(kc); return (do_ioctl(no, keyword, behavior, suppress)); } mesg(MDEBUG, "kstat indicates S3 support (%lx)\n", dp->value.l); @@ -268,14 +268,14 @@ dp = kstat_data_lookup(ksp, "preferred_pm_profile"); if (dp == NULL) { mesg(MDEBUG, "kstat_data_lookup 'ppmp fails\n"); - kstat_close(kc); + (void) kstat_close(kc); return (do_ioctl(no, keyword, behavior, suppress)); } mesg(MDEBUG, "kstat indicates preferred_pm_profile is %lx\n", dp->value.l); preferred_pm_profile = dp->value.l; } - kstat_close(kc); + (void) kstat_close(kc); if ((shp = smbios_open(NULL, SMB_VERSION, oflags, &ret)) == NULL) { @@ -906,7 +906,7 @@ err_fmt = "ufs statefile with zfs root is not" " supported\n"; mesg(MERR, err_fmt, sfile); - fclose(fp); + (void) fclose(fp); return (1); } resetmnttab(fp); @@ -1014,7 +1014,7 @@ return (0); } arg += 14; - strncpy(pool_name, arg, MAXPATHLEN); + (void) strncpy(pool_name, arg, MAXPATHLEN); if (p = strchr(pool_name, '/')) *p = '\0'; STRCPYLIM(new_cc.cf_fs, p + 1, "statefile path"); @@ -1050,8 +1050,8 @@ libzfs_fini(lzfs); return (-1); } - strcpy(diskname, "/dev/dsk/"); - strcat(diskname, vname); + (void) strcpy(diskname, "/dev/dsk/"); + (void) strcat(diskname, vname); free(vname); zpool_close(zpool_handle); libzfs_fini(lzfs); @@ -1078,7 +1078,7 @@ y = strstr(sfile, "dsk/"); if (x != NULL) { *x++ = 'r'; - strcpy(x, y); + (void) strcpy(x, y); } if ((fd = open(rdskname, O_RDONLY)) == -1) { @@ -1090,13 +1090,13 @@ */ if (vtoc.v_part[rc].p_start < 2) *err = "using '%s' would clobber the disk label\n"; - close(fd); + (void) close(fd); return (*err ? B_FALSE : B_TRUE); } else if ((rc == VT_ENOTSUP) && (efi_alloc_and_read(fd, &gpt)) >= 0) { /* EFI slices don't clobber the disk label */ free(gpt); - close(fd); + (void) close(fd); return (B_TRUE); } else *err = "could not read partition table from '%s'\n";
--- a/usr/src/cmd/power/powerd.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/power/powerd.c Wed Nov 11 21:59:42 2009 -0800 @@ -407,7 +407,7 @@ ret = ioctl(fd, SRN_IOC_AUTOSX, NULL); if (ret == -1) { logerror("Ioctl SRN_IOC_AUTOSX failed: %s", strerror(errno)); - close(fd); + (void) close(fd); thr_exit((void *) errno); } poll_fd.fd = fd; @@ -422,7 +422,7 @@ continue; default: logerror("Poll error: %s", strerror(errno)); - close(fd); + (void) close(fd); thr_exit((void *) errno); } } @@ -430,7 +430,7 @@ ret = ioctl(fd, SRN_IOC_NEXTEVENT, &srn_event); if (ret == -1) { logerror("ioctl error: %s", strerror(errno)); - close(fd); + (void) close(fd); thr_exit((void *) errno); } switch (srn_event.ae_type) { @@ -461,7 +461,7 @@ if (read(asfd, (void *)&asinfo, sizeof (asinfo)) != sizeof (asinfo)) { logerror("Unable to read CPR config file '%s'", CPR_CONFIG); - close(asfd); + (void) close(asfd); return (-1); } @@ -720,14 +720,14 @@ "Since autowakeup time is less than 3 minutes away, " "autoshutdown will not occur."); shutdown_time = *now + 180; - close(tod_fd); + (void) close(tod_fd); return; } if (ioctl(tod_fd, TOD_SET_ALARM, &wakeup_time) == -1) { logerror("Unable to program TOD" " alarm for autowakeup."); - close(tod_fd); + (void) close(tod_fd); return; } } @@ -740,7 +740,7 @@ NULL) == -1) logerror("Unable to clear " "alarm in TOD device."); - close(tod_fd); + (void) close(tod_fd); } (void) time(now); @@ -860,7 +860,7 @@ ckdone: if (prom_fd != -1) - close(prom_fd); + (void) close(prom_fd); return (ret); } @@ -1007,7 +1007,7 @@ if (stat("/dev/console", &statbuf) == -1 || (pwd = getpwuid(statbuf.st_uid)) == NULL) { - mutex_unlock(&poweroff_mutex); + (void) mutex_unlock(&poweroff_mutex); return (1); } @@ -1016,7 +1016,7 @@ if (*cmd_argv == NULL) { logerror("No command to run."); - mutex_unlock(&poweroff_mutex); + (void) mutex_unlock(&poweroff_mutex); return (1); } @@ -1026,7 +1026,7 @@ free(home); free(user); logerror("No memory."); - mutex_unlock(&poweroff_mutex); + (void) mutex_unlock(&poweroff_mutex); return (1); } (void) strcpy(home, ehome); @@ -1059,7 +1059,7 @@ free(home); free(user); if (child == -1) { - mutex_unlock(&poweroff_mutex); + (void) mutex_unlock(&poweroff_mutex); return (1); } } @@ -1068,11 +1068,11 @@ pid = wait(&status); if (WEXITSTATUS(status)) { (void) syslog(LOG_ERR, "Failed to exec \"%s\".", cmd_argv[0]); - mutex_unlock(&poweroff_mutex); + (void) mutex_unlock(&poweroff_mutex); return (1); } - mutex_unlock(&poweroff_mutex); + (void) mutex_unlock(&poweroff_mutex); return (0); } @@ -1251,7 +1251,7 @@ { di_node_t root_node; - sleep(60); /* let booting finish first */ + (void) sleep(60); /* let booting finish first */ if ((root_node = di_init("/", DINFOFORCE)) == DI_NODE_NIL) { logerror("Failed to attach devices.");
--- a/usr/src/cmd/power/sys-suspend.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/power/sys-suspend.c Wed Nov 11 21:59:42 2009 -0800 @@ -366,7 +366,8 @@ * if we don't already have one. */ if (event != NULL) { - adt_put_event(event, ADT_FAILURE, 0); + (void) adt_put_event(event, + ADT_FAILURE, 0); } } } @@ -498,14 +499,14 @@ */ if ((home_dir = getenv("HOME")) == NULL) { if ((pwd = getpwuid(uid)) == NULL) { - printf(gettext("Error: unable to get passwd " + (void) printf(gettext("Error: unable to get passwd " "entry for user.\n")); exit(1); } home_dir = pwd->pw_dir; } if ((strlen(home_dir) + sizeof ("/.Xauthority")) >= MAXPATHLEN) { - printf(gettext("Error: path to home directory is too " + (void) printf(gettext("Error: path to home directory is too " "long.\n")); exit(1); } @@ -590,9 +591,9 @@ */ if (ttyname(0) == NULL) { no_tty = 1; - dup2(open("/dev/console", O_RDONLY), 0); - dup2(open("/dev/console", O_WRONLY), 1); - dup2(open("/dev/console", O_WRONLY), 2); + (void) dup2(open("/dev/console", O_RDONLY), 0); + (void) dup2(open("/dev/console", O_WRONLY), 1); + (void) dup2(open("/dev/console", O_WRONLY), 2); } while ((c = getopt(argc, argv, "fnxhtd:")) != EOF) { @@ -675,7 +676,7 @@ * do it now, we at least prevent a lot of unneeded setup. */ pw = getpwuid(getuid()); - strncpy(user, pw->pw_name, NMAX); + (void) strncpy(user, pw->pw_name, NMAX); if ((flags & (FORCE|SHUTDOWN)) && (chkauthattr(AUTHNAME_SHUTDOWN, pw->pw_name) != 1)) { @@ -726,7 +727,7 @@ pm_suspend(); if (refresh_dt() == -1) { - printf("%s: Failed to refresh screen.\n", argv[0]); + (void) printf("%s: Failed to refresh screen.\n", argv[0]); return (1); } return (0); @@ -751,16 +752,17 @@ int fd; if ((fd = open("/dev/pm", O_RDWR)) < 0) { - printf(gettext("Can't open /dev/pm\n")); + (void) printf(gettext("Can't open /dev/pm\n")); return (-1); } if (ioctl(fd, PM_IDLE_DOWN, NULL) < 0) { - printf(gettext("Failed to bring system to low power mode.\n")); - close(fd); + (void) printf(gettext("Failed to bring system " + "to low power mode.\n")); + (void) close(fd); return (-1); } - close(fd); + (void) close(fd); return (0); } @@ -778,17 +780,17 @@ int found = 0; if ((fd = open(CPR_CONFIG, O_RDONLY)) < 0) { - printf(gettext("Can't open /etc/.cpr_config file.")); + (void) printf(gettext("Can't open /etc/.cpr_config file.")); return (found); } if (read(fd, (void *) &cf, sizeof (cf)) != sizeof (cf)) { - printf(gettext("Can't read /etc/.cpr_config file.")); + (void) printf(gettext("Can't read /etc/.cpr_config file.")); } else { found = cf.is_autopm_default; } - close(fd); + (void) close(fd); return (found); }
--- a/usr/src/cmd/sgs/librtld/amd64/_relocate.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/sgs/librtld/amd64/_relocate.c Wed Nov 11 21:59:42 2009 -0800 @@ -20,12 +20,10 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <string.h> #include "machdep.h" #include "reloc.h" @@ -140,7 +138,7 @@ addr = (uintptr_t)oaddr - rel->r_offset; /* LINTED */ - elf_plt_write((uintptr_t)addr, vaddr, rel, + (void) elf_plt_write((uintptr_t)addr, vaddr, rel, (uintptr_t)value, reloc->r_pltndx); } else if (type == R_AMD64_COPY) {
--- a/usr/src/cmd/sgs/librtld/i386/_relocate.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/sgs/librtld/i386/_relocate.c Wed Nov 11 21:59:42 2009 -0800 @@ -20,10 +20,9 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" #include <string.h> #include "machdep.h" @@ -130,7 +129,7 @@ vaddr = ADDR(lmp); addr = (uintptr_t)oaddr - rel->r_offset; /* LINTED */ - elf_plt_write((uintptr_t)addr, vaddr, rel, + (void) elf_plt_write((uintptr_t)addr, vaddr, rel, (uintptr_t)value, reloc->r_pltndx); } else if (type == R_386_COPY) {
--- a/usr/src/cmd/sgs/librtld/sparc/_relocate.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/sgs/librtld/sparc/_relocate.c Wed Nov 11 21:59:42 2009 -0800 @@ -20,10 +20,9 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" #include <string.h> #include "machdep.h" @@ -129,7 +128,7 @@ addr = (uintptr_t)oaddr - rel->r_offset; /* LINTED */ - elf_plt_write((uintptr_t)addr, vaddr, rel, + (void) elf_plt_write((uintptr_t)addr, vaddr, rel, (uintptr_t)value, reloc->r_pltndx); } else if (type == R_SPARC_COPY) {
--- a/usr/src/cmd/sgs/librtld/sparcv9/_relocate.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/sgs/librtld/sparcv9/_relocate.c Wed Nov 11 21:59:42 2009 -0800 @@ -20,10 +20,9 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" #include <string.h> #include "machdep.h" @@ -129,7 +128,7 @@ addr = (uintptr_t)oaddr - rel->r_offset; /* LINTED */ - elf_plt_write((uintptr_t)addr, vaddr, rel, + (void) elf_plt_write((uintptr_t)addr, vaddr, rel, (uintptr_t)value, reloc->r_pltndx); } else if (type == R_SPARC_COPY) {
--- a/usr/src/cmd/sgs/rtld/mdbmod/common/rtld.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/sgs/rtld/mdbmod/common/rtld.c Wed Nov 11 21:59:42 2009 -0800 @@ -304,11 +304,11 @@ return (DCMD_ERR); } - mdb_inc_indent(4); + (void) mdb_inc_indent(4); mdb_printf(MSG_ORIG(MSG_STR_DASHES)); if (dcmd_Bind((uintptr_t)bdp, flags, argc, argv) == DCMD_ERR) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } @@ -322,11 +322,11 @@ mdb_printf(MSG_ORIG(MSG_STR_DASHES)); if (dcmd_Bind((uintptr_t)bdp, flags, argc, argv) == DCMD_ERR) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } } - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_OK); } @@ -499,8 +499,8 @@ if (wdp && (wdp->w_flags & RTLD_FLG_VERBOSE)) { mdb_printf(MSG_ORIG(MSG_STR_DASHES)); - mdb_call_dcmd(MSG_ORIG(MSG_RTMAP_STR), addr, DCMD_ADDRSPEC, - NULL, NULL); + (void) mdb_call_dcmd( + MSG_ORIG(MSG_RTMAP_STR), addr, DCMD_ADDRSPEC, NULL, NULL); return (0); } @@ -598,7 +598,7 @@ return (DCMD_ERR); } - mdb_inc_indent(2); + (void) mdb_inc_indent(2); if (lm.lm_flags & LML_FLG_BASELM) str = MSG_ORIG(MSG_LMLIST_BASE); else if (lm.lm_flags & LML_FLG_RTLDLM) @@ -612,7 +612,7 @@ mdb_printf(MSG_ORIG(MSG_LMLIST_TITLE2), datap, str); mdb_printf(MSG_ORIG(MSG_STR_DASHES)); - mdb_inc_indent(2); + (void) mdb_inc_indent(2); if (((flags & DCMD_LOOPFIRST) || !(flags & DCMD_LOOP)) && !(flg & RTLD_FLG_VERBOSE)) { @@ -623,10 +623,10 @@ wdesc.w_flags = flg; if (mdb_pwalk(MSG_ORIG(MSG_RTMAPS_STR), rtmap_format, (void *)&wdesc, (uintptr_t)lm.lm_head) == -1) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } - mdb_dec_indent(4); + (void) mdb_dec_indent(4); flags &= ~DCMD_LOOPFIRST; } return (DCMD_OK); @@ -843,13 +843,13 @@ mdb_printf(MSG_ORIG(MSG_LMLIST_LINE0), addr, (size_t)al.al_nitems, (size_t)al.al_arritems); - mdb_inc_indent(2); + (void) mdb_inc_indent(2); mdb_printf(MSG_ORIG(MSG_STR_DASHES)); if (al.al_nitems && (flg & RTLD_FLG_VERBOSE)) { uintptr_t nitems; - mdb_inc_indent(2); + (void) mdb_inc_indent(2); mdb_printf(MSG_ORIG(MSG_LMC_LINE1), datap); mdb_printf(MSG_ORIG(MSG_LMC_LINE2), lmc.lc_head, lmc.lc_tail); @@ -865,7 +865,7 @@ if (mdb_pwalk(MSG_ORIG(MSG_RTMAPS_STR), rtmap_format, (void *)0, (uintptr_t)lmc.lc_head) == -1) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } } else @@ -880,7 +880,7 @@ datap) == -1) { mdb_warn(MSG_ORIG(MSG_ERR_READ), MSG_ORIG(MSG_LMLIST_STR), datap); - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } @@ -900,7 +900,7 @@ if (mdb_pwalk(MSG_ORIG(MSG_RTMAPS_STR), rtmap_format, (void *)0, (uintptr_t)lmc.lc_head) == -1) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } } else @@ -909,9 +909,9 @@ mdb_printf(MSG_ORIG(MSG_STR_DASHES)); } - mdb_dec_indent(2); + (void) mdb_dec_indent(2); } - mdb_dec_indent(2); + (void) mdb_dec_indent(2); } mdb_printf(MSG_ORIG(MSG_LMLIST_LINE1), lml.lm_head, lml.lm_tail); @@ -988,13 +988,13 @@ return (DCMD_ERR); } - mdb_inc_indent(2); + (void) mdb_inc_indent(2); if (_dcmd_Lm_list((uintptr_t)lml, flags, argc, argv) == DCMD_ERR) { - mdb_dec_indent(2); + (void) mdb_dec_indent(2); return (DCMD_ERR); } - mdb_dec_indent(2); + (void) mdb_dec_indent(2); flags &= ~DCMD_LOOPFIRST; } return (DCMD_OK); @@ -1105,7 +1105,7 @@ if (((flg & RTLD_FLG_VERBOSE) == 0) || (al.al_nitems == 0)) return (DCMD_OK); - mdb_inc_indent(4); + (void) mdb_inc_indent(4); mdb_printf(MSG_ORIG(MSG_STR_DASHES)); /* @@ -1114,7 +1114,7 @@ */ datap = ALIST_OFF_DATA + (uintptr_t)addr; if (dcmd_GrpDesc(datap, flags, argc, argv) == DCMD_ERR) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } @@ -1122,12 +1122,12 @@ datap += al.al_size; mdb_printf(MSG_ORIG(MSG_STR_DASHES)); if (dcmd_GrpDesc(datap, flags, argc, argv) == DCMD_ERR) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } } - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_OK); } @@ -1199,11 +1199,11 @@ return (DCMD_ERR); } - mdb_inc_indent(4); + (void) mdb_inc_indent(4); mdb_printf(MSG_ORIG(MSG_STR_DASHES)); if (dcmd_GrpHdl((uintptr_t)ghp, flags, argc, argv) == DCMD_ERR) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } @@ -1219,11 +1219,11 @@ mdb_printf(MSG_ORIG(MSG_STR_DASHES)); if (dcmd_GrpHdl((uintptr_t)ghp, flags, argc, argv) == DCMD_ERR) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } } - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_OK); } @@ -1296,11 +1296,11 @@ return (DCMD_ERR); } - mdb_inc_indent(4); + (void) mdb_inc_indent(4); mdb_printf(MSG_ORIG(MSG_STR_DASHES)); if (dcmd_GrpHdl((uintptr_t)ghp, flags, argc, argv) == DCMD_ERR) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } @@ -1315,11 +1315,11 @@ mdb_printf(MSG_ORIG(MSG_STR_DASHES)); if (dcmd_GrpHdl((uintptr_t)ghp, flags, argc, argv) == DCMD_ERR) { - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_ERR); } } - mdb_dec_indent(4); + (void) mdb_dec_indent(4); return (DCMD_OK); } static void
--- a/usr/src/cmd/sgs/yacc/common/libmai.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/sgs/yacc/common/libmai.c Wed Nov 11 21:59:42 2009 -0800 @@ -20,15 +20,13 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1989 AT&T */ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <locale.h> #pragma weak yyparse @@ -39,6 +37,6 @@ main(int argc, char **argv) { (void) setlocale(LC_ALL, ""); - yyparse(); + (void) yyparse(); return (0); }
--- a/usr/src/cmd/svc/svccfg/svccfg_libscf.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/svc/svccfg/svccfg_libscf.c Wed Nov 11 21:59:42 2009 -0800 @@ -9624,7 +9624,7 @@ if (strcmp(exp_str, SCF_LEGACY_SERVICE) == 0) continue; - xmlAddChild(sb, export_service(svc, flags)); + (void) xmlAddChild(sb, export_service(svc, flags)); } free(exp_str); @@ -9831,7 +9831,7 @@ scfdie(); if (snode->children != NULL) - xmlAddChild(sb, snode); + (void) xmlAddChild(sb, snode); else xmlFreeNode(snode); }
--- a/usr/src/cmd/svc/svccfg/svccfg_xml.c Wed Nov 11 22:37:39 2009 -0700 +++ b/usr/src/cmd/svc/svccfg/svccfg_xml.c Wed Nov 11 21:59:42 2009 -0800 @@ -230,7 +230,7 @@ /* * DTD validation, with line numbers. */ - xmlLineNumbersDefault(1); + (void) xmlLineNumbersDefault(1); xmlLoadExtDtdDefaultValue |= XML_DETECT_IDS; xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS; }