Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin fix unused variable warnings.



details:   https://anonhg.NetBSD.org/src/rev/24f1074d4ff8
branches:  trunk
changeset: 790703:24f1074d4ff8
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Oct 19 17:16:37 2013 +0000

description:
fix unused variable warnings.

diffstat:

 usr.sbin/acpitools/aml/aml_common.c    |   6 +-
 usr.sbin/acpitools/aml/aml_parse.c     |   8 +--
 usr.sbin/altq/altqstat/quip_client.c   |   5 +-
 usr.sbin/altq/libaltq/qop_cbq.c        |   6 +--
 usr.sbin/altq/libaltq/qop_hfsc.c       |   4 +-
 usr.sbin/altq/libaltq/qop_jobs.c       |   5 --
 usr.sbin/altq/libaltq/qop_priq.c       |   7 +--
 usr.sbin/altq/libaltq/quip_server.c    |  11 ++--
 usr.sbin/bootp/bootptest/print-bootp.c |   5 +-
 usr.sbin/makefs/cd9660.c               |  26 ++++-------
 usr.sbin/makefs/cd9660/cd9660_debug.c  |   5 +-
 usr.sbin/makefs/cd9660/cd9660_write.c  |  10 +---
 usr.sbin/makefs/ffs/mkfs.c             |   7 +-
 usr.sbin/makefs/msdos/msdosfs_denode.c |   7 +-
 usr.sbin/makefs/msdos/msdosfs_vnops.c  |   6 +-
 usr.sbin/makefs/udf.c                  |   7 +--
 usr.sbin/mmcformat/mmcformat.c         |   7 +--
 usr.sbin/mopd/mopd/process.c           |  48 +++++++++-----------
 usr.sbin/mopd/mopprobe/mopprobe.c      |   8 +-
 usr.sbin/mountd/mountd.c               |   6 +-
 usr.sbin/moused/moused.c               |  77 ++++++++++++++++-----------------
 usr.sbin/pf/pfs/parse.y                |   6 +-
 usr.sbin/pppd/pppd/tdb.c               |   6 +-
 usr.sbin/pstat/pstat.c                 |  11 +++-
 usr.sbin/quot/quot.c                   |  12 +++-
 usr.sbin/rpcbind/pmap_svc.c            |   5 +-
 usr.sbin/rpcbind/rpcbind.c             |   4 +-
 usr.sbin/rtsold/rtsold.c               |   5 +-
 usr.sbin/sliplogin/sliplogin.c         |  13 +++--
 usr.sbin/sunlabel/sunlabel.c           |   5 +-
 usr.sbin/ypserv/mknetid/mknetid.c      |   8 +-
 31 files changed, 151 insertions(+), 195 deletions(-)

diffs (truncated from 1311 to 300 lines):

diff -r 9bf32ce2bcc6 -r 24f1074d4ff8 usr.sbin/acpitools/aml/aml_common.c
--- a/usr.sbin/acpitools/aml/aml_common.c       Sat Oct 19 17:16:25 2013 +0000
+++ b/usr.sbin/acpitools/aml/aml_common.c       Sat Oct 19 17:16:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aml_common.c,v 1.3 2011/05/30 01:15:30 dyoung Exp $    */
+/*     $NetBSD: aml_common.c,v 1.4 2013/10/19 17:16:37 christos Exp $  */
 
 /*-
  * Copyright (c) 1999 Takanori Watanabe
@@ -30,7 +30,7 @@
  *     $FreeBSD: src/usr.sbin/acpi/amldb/aml/aml_common.c,v 1.6 2000/11/09 06:24:45 iwasaki Exp $
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: aml_common.c,v 1.3 2011/05/30 01:15:30 dyoung Exp $");
+__RCSID("$NetBSD: aml_common.c,v 1.4 2013/10/19 17:16:37 christos Exp $");
 
 #include <sys/param.h>
 
@@ -537,10 +537,8 @@
     struct aml_region_handle *h)
 {
        int     state;
-       struct  aml_name *pci_info;
 
        state = 0;
-       pci_info = NULL;
        bzero(h, sizeof(struct aml_region_handle));
 
        h->env = env;
diff -r 9bf32ce2bcc6 -r 24f1074d4ff8 usr.sbin/acpitools/aml/aml_parse.c
--- a/usr.sbin/acpitools/aml/aml_parse.c        Sat Oct 19 17:16:25 2013 +0000
+++ b/usr.sbin/acpitools/aml/aml_parse.c        Sat Oct 19 17:16:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aml_parse.c,v 1.3 2011/06/21 09:36:46 mrg Exp $        */
+/*     $NetBSD: aml_parse.c,v 1.4 2013/10/19 17:16:37 christos Exp $   */
 
 /*-
  * Copyright (c) 1999 Doug Rabson
@@ -30,7 +30,7 @@
  *     $FreeBSD: src/usr.sbin/acpi/amldb/aml/aml_parse.c,v 1.7 2001/10/23 14:54:15 takawata Exp $
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: aml_parse.c,v 1.3 2011/06/21 09:36:46 mrg Exp $");
+__RCSID("$NetBSD: aml_parse.c,v 1.4 2013/10/19 17:16:37 christos Exp $");
 
 #include <sys/param.h>
 
@@ -761,12 +761,10 @@
 aml_parse_fieldlist(struct aml_environ *env, struct aml_field *template,
     int indent)
 {
-       u_int32_t       offset;
 
-       offset = 0;
        while (env->dp < env->end) {
                aml_print_indent(indent);
-               offset = aml_parse_field(env, template);
+               (void)aml_parse_field(env, template);
                if (env->dp < env->end) {
                        AML_DEBUGPRINT(",\n");
                } else {
diff -r 9bf32ce2bcc6 -r 24f1074d4ff8 usr.sbin/altq/altqstat/quip_client.c
--- a/usr.sbin/altq/altqstat/quip_client.c      Sat Oct 19 17:16:25 2013 +0000
+++ b/usr.sbin/altq/altqstat/quip_client.c      Sat Oct 19 17:16:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: quip_client.c,v 1.9 2006/10/12 19:59:13 peter Exp $    */
+/*     $NetBSD: quip_client.c,v 1.10 2013/10/19 17:16:37 christos Exp $        */
 /*     $KAME: quip_client.c,v 1.9 2003/05/17 05:59:00 itojun Exp $     */
 /*
  * Copyright (C) 1999-2000
@@ -269,7 +269,6 @@
 quip_rawmode(void)
 {
        char line[MAXLINESIZE];
-       int result_code;
 
        printf(">>>Entering the raw interactive mode to the server:\n\n");
        if (server == NULL) {
@@ -297,7 +296,7 @@
                quip_sendrequest(server, line);
 
                /* get a response message from the server */
-               result_code = quip_recvresponse(server, NULL, NULL, NULL);
+               (void)quip_recvresponse(server, NULL, NULL, NULL);
        }
 }
 
diff -r 9bf32ce2bcc6 -r 24f1074d4ff8 usr.sbin/altq/libaltq/qop_cbq.c
--- a/usr.sbin/altq/libaltq/qop_cbq.c   Sat Oct 19 17:16:25 2013 +0000
+++ b/usr.sbin/altq/libaltq/qop_cbq.c   Sat Oct 19 17:16:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: qop_cbq.c,v 1.9 2010/01/06 06:30:37 mbalmer Exp $      */
+/*     $NetBSD: qop_cbq.c,v 1.10 2013/10/19 17:16:37 christos Exp $    */
 /*     $KAME: qop_cbq.c,v 1.7 2002/05/31 06:03:35 kjc Exp $    */
 /*
  * Copyright (c) Sun Microsystems, Inc. 1993-1998 All rights reserved.
@@ -762,7 +762,6 @@
        double          f;
        double          gton;
        double          gtom;
-       double          maxrate;
 
        /* Compute other class parameters */
        if (bandwidth == 0)
@@ -783,7 +782,6 @@
 
         nsPerByte = cbq_ifinfo->nsPerByte / f;
        ptime = (double) av_pkt_size * (double)cbq_ifinfo->nsPerByte;
-       maxrate = f * ((double)ifinfo->bandwidth / 8.0);
        cptime = ptime * (1.0 - f) / f;
 #if 1 /* ALTQ */
        if (nsPerByte * (double)max_pkt_size > (double)INT_MAX) {
@@ -997,9 +995,7 @@
 {
        struct cbq_add_class class_add;
        struct cbq_classinfo *cbq_clinfo;
-       struct cbq_ifinfo *cbq_ifinfo;
 
-       cbq_ifinfo = clinfo->ifinfo->private;
        cbq_clinfo = clinfo->private;
        
        memset(&class_add, 0, sizeof(class_add));
diff -r 9bf32ce2bcc6 -r 24f1074d4ff8 usr.sbin/altq/libaltq/qop_hfsc.c
--- a/usr.sbin/altq/libaltq/qop_hfsc.c  Sat Oct 19 17:16:25 2013 +0000
+++ b/usr.sbin/altq/libaltq/qop_hfsc.c  Sat Oct 19 17:16:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: qop_hfsc.c,v 1.9 2010/03/01 00:13:47 joerg Exp $       */
+/*     $NetBSD: qop_hfsc.c,v 1.10 2013/10/19 17:16:37 christos Exp $   */
 /*     $KAME: qop_hfsc.c,v 1.12 2005/01/05 04:53:47 itojun Exp $       */
 /*
  * Copyright (C) 1999-2000
@@ -1071,9 +1071,7 @@
 {
        struct hfsc_add_class class_add;
        struct hfsc_classinfo *hfsc_clinfo;
-       struct hfsc_ifinfo *hfsc_ifinfo;
 
-       hfsc_ifinfo = clinfo->ifinfo->private;
        hfsc_clinfo = clinfo->private;
 
        memset(&class_add, 0, sizeof(class_add));
diff -r 9bf32ce2bcc6 -r 24f1074d4ff8 usr.sbin/altq/libaltq/qop_jobs.c
--- a/usr.sbin/altq/libaltq/qop_jobs.c  Sat Oct 19 17:16:25 2013 +0000
+++ b/usr.sbin/altq/libaltq/qop_jobs.c  Sat Oct 19 17:16:37 2013 +0000
@@ -449,9 +449,6 @@
         * i'm not sure how/when it's used, so I just
         * leave it here
         */
-       struct jobs_classinfo *jobs_clinfo;
-
-       jobs_clinfo = clinfo->private;
        return (0);
 }
 
@@ -610,9 +607,7 @@
 {
        struct jobs_add_class class_add;
        struct jobs_classinfo *jobs_clinfo;
-       struct jobs_ifinfo *jobs_ifinfo;
 
-       jobs_ifinfo = clinfo->ifinfo->private;
        jobs_clinfo = clinfo->private;
 
        memset(&class_add, 0, sizeof(class_add));
diff -r 9bf32ce2bcc6 -r 24f1074d4ff8 usr.sbin/altq/libaltq/qop_priq.c
--- a/usr.sbin/altq/libaltq/qop_priq.c  Sat Oct 19 17:16:25 2013 +0000
+++ b/usr.sbin/altq/libaltq/qop_priq.c  Sat Oct 19 17:16:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: qop_priq.c,v 1.5 2002/03/05 04:11:53 itojun Exp $      */
+/*     $NetBSD: qop_priq.c,v 1.6 2013/10/19 17:16:37 christos Exp $    */
 /*     $KAME: qop_priq.c,v 1.4 2001/12/03 08:20:55 kjc Exp $   */
 /*
  * Copyright (C) 2000
@@ -305,13 +305,12 @@
 qop_priq_modify_class(struct classinfo *clinfo, 
                      int pri, int qlimit, int flags)
 {
-       struct priq_classinfo *priq_clinfo, *parent_clinfo;
+       struct priq_classinfo *priq_clinfo;
        int error;
 
        priq_clinfo = clinfo->private;
        if (clinfo->parent == NULL)
                return (QOPERR_CLASS_INVAL);
-       parent_clinfo = clinfo->parent->private;
 
        priq_clinfo->pri = pri;
        priq_clinfo->qlimit = qlimit;
@@ -431,9 +430,7 @@
 {
        struct priq_add_class class_add;
        struct priq_classinfo *priq_clinfo;
-       struct priq_ifinfo *priq_ifinfo;
 
-       priq_ifinfo = clinfo->ifinfo->private;
        priq_clinfo = clinfo->private;
        
        memset(&class_add, 0, sizeof(class_add));
diff -r 9bf32ce2bcc6 -r 24f1074d4ff8 usr.sbin/altq/libaltq/quip_server.c
--- a/usr.sbin/altq/libaltq/quip_server.c       Sat Oct 19 17:16:25 2013 +0000
+++ b/usr.sbin/altq/libaltq/quip_server.c       Sat Oct 19 17:16:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: quip_server.c,v 1.5 2009/04/15 00:13:51 lukem Exp $    */
+/*     $NetBSD: quip_server.c,v 1.6 2013/10/19 17:16:37 christos Exp $ */
 /*     $KAME: quip_server.c,v 1.6 2001/08/20 06:41:32 kjc Exp $        */
 /*
  * Copyright (C) 1999-2000
@@ -213,7 +213,6 @@
        struct fltrinfo *fltrinfo;
        char *ifname, *class_field, *fltr_field, buf[256], *cp;
        u_long handle;
-       int len;
 
        strlcpy(buf, arg, sizeof(buf));
        cp = buf;
@@ -229,7 +228,7 @@
                if ((fltrinfo = flhandle2fltrinfo(ifinfo, handle)) == NULL)
                        return (-1);
 
-               len = expand_filtername(fltrinfo, msg, maxmsg);
+               (void)expand_filtername(fltrinfo, msg, maxmsg);
        } else {
                if (sscanf(class_field, "%lx", &handle) != 1)
                        return (-1);
@@ -238,7 +237,7 @@
                if ((clinfo = clhandle2clinfo(ifinfo, handle)) == NULL)
                                return (-1);
 
-               len = expand_classname(clinfo, msg, maxmsg);
+               (void)expand_classname(clinfo, msg, maxmsg);
        }
        strlcat(msg, "\n", maxmsg);
        return (strlen(msg));
@@ -264,13 +263,13 @@
        struct ifinfo *ifinfo;
        struct fltrinfo *fltrinfo;
        struct flow_filter *filt;
-       char *ifname, *class_field, *fltr_field, buf[256], *cp;
+       char *ifname, *fltr_field, buf[256], *cp;
        u_long handle;
 
        strlcpy(buf, arg, sizeof(buf));
        cp = buf;
        ifname = strsep(&cp, ":");
-       class_field = strsep(&cp, ":");
+       (void)strsep(&cp, ":");
        fltr_field = cp;
 
        if (fltr_field == NULL)
diff -r 9bf32ce2bcc6 -r 24f1074d4ff8 usr.sbin/bootp/bootptest/print-bootp.c
--- a/usr.sbin/bootp/bootptest/print-bootp.c    Sat Oct 19 17:16:25 2013 +0000
+++ b/usr.sbin/bootp/bootptest/print-bootp.c    Sat Oct 19 17:16:37 2013 +0000
@@ -26,7 +26,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: print-bootp.c,v 1.10 2009/04/15 00:23:29 lukem Exp $");
+__RCSID("$NetBSD: print-bootp.c,v 1.11 2013/10/19 17:16:37 christos Exp $");
 /* 93/10/10 <gwr%mc.com@localhost> New data-driven option print routine. */
 #endif
 
@@ -375,7 +375,6 @@
 cmu_print(u_char *bp, int length)
 {
        struct cmu_vend *v;
-       u_char *ep;
 
        printf("-cmu");
 
@@ -384,8 +383,6 @@
                printf(" |L=%d", length);
                return;
        }
-       /* Setup end pointer */
-       ep = bp + length;
 
        /* Subnet mask */
        if (v->v_flags & VF_SMASK) {
diff -r 9bf32ce2bcc6 -r 24f1074d4ff8 usr.sbin/makefs/cd9660.c
--- a/usr.sbin/makefs/cd9660.c  Sat Oct 19 17:16:25 2013 +0000
+++ b/usr.sbin/makefs/cd9660.c  Sat Oct 19 17:16:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd9660.c,v 1.44 2013/07/30 16:02:23 reinoud Exp $      */
+/*     $NetBSD: cd9660.c,v 1.45 2013/10/19 17:16:37 christos Exp $     */
 
 /*
  * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -103,7 +103,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: cd9660.c,v 1.44 2013/07/30 16:02:23 reinoud Exp $");
+__RCSID("$NetBSD: cd9660.c,v 1.45 2013/10/19 17:16:37 christos Exp $");
 #endif  /* !__lint */
 
 #include <string.h>
@@ -660,10 +660,6 @@
 cd9660_finalize_PVD(iso9660_disk *diskStructure)
 {
        time_t tim;



Home | Main Index | Thread Index | Old Index