Source-Changes-HG archive

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

[src/trunk]: src/dist/pppd/pppd fix unused variable warnings



details:   https://anonhg.NetBSD.org/src/rev/0788b391d822
branches:  trunk
changeset: 790785:0788b391d822
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 20 21:16:05 2013 +0000

description:
fix unused variable warnings

diffstat:

 dist/pppd/pppd/auth.c  |   8 ++------
 dist/pppd/pppd/cbcp.c  |  15 +++++++++++----
 dist/pppd/pppd/utils.c |   7 +++----
 3 files changed, 16 insertions(+), 14 deletions(-)

diffs (131 lines):

diff -r 428e2f9680b6 -r 0788b391d822 dist/pppd/pppd/auth.c
--- a/dist/pppd/pppd/auth.c     Sun Oct 20 21:13:23 2013 +0000
+++ b/dist/pppd/pppd/auth.c     Sun Oct 20 21:16:05 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auth.c,v 1.8 2011/10/07 10:42:54 joerg Exp $   */
+/*     $NetBSD: auth.c,v 1.9 2013/10/20 21:16:05 christos Exp $        */
 
 /*
  * auth.c - PPP authentication and phase control.
@@ -75,7 +75,7 @@
 #if 0
 #define RCSID  "Id: auth.c,v 1.112 2006/06/18 11:26:00 paulus Exp"
 #else
-__RCSID("$NetBSD: auth.c,v 1.8 2011/10/07 10:42:54 joerg Exp $");
+__RCSID("$NetBSD: auth.c,v 1.9 2013/10/20 21:16:05 christos Exp $");
 #endif
 #endif
 
@@ -565,12 +565,9 @@
 void start_link(unit)
     int unit;
 {
-    char *msg;
-
     new_phase(PHASE_SERIALCONN);
 
     devfd = the_channel->connect();
-    msg = "Connect script failed";
     if (devfd < 0)
        goto fail;
 
@@ -583,7 +580,6 @@
      * gives us.  Thus we don't need the tdb_writelock/tdb_writeunlock.
      */
     fd_ppp = the_channel->establish_ppp(devfd);
-    msg = "ppp establishment failed";
     if (fd_ppp < 0) {
        status = EXIT_FATAL_ERROR;
        goto disconnect;
diff -r 428e2f9680b6 -r 0788b391d822 dist/pppd/pppd/cbcp.c
--- a/dist/pppd/pppd/cbcp.c     Sun Oct 20 21:13:23 2013 +0000
+++ b/dist/pppd/pppd/cbcp.c     Sun Oct 20 21:16:05 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cbcp.c,v 1.3 2006/06/29 21:50:17 christos Exp $        */
+/*     $NetBSD: cbcp.c,v 1.4 2013/10/20 21:16:05 christos Exp $        */
 
 /*
  * cbcp - Call Back Configuration Protocol.
@@ -40,7 +40,7 @@
 #if 0
 #define RCSID  "Id: cbcp.c,v 1.17 2006/05/22 00:04:07 paulus Exp"
 #else
-__RCSID("$NetBSD: cbcp.c,v 1.3 2006/06/29 21:50:17 christos Exp $");
+__RCSID("$NetBSD: cbcp.c,v 1.4 2013/10/20 21:16:05 christos Exp $");
 #endif
 #endif
 
@@ -291,6 +291,7 @@
                char str[256];
 
                GETCHAR(addrt, p);
+               __USE(addrt);
                memcpy(str, p, olen - 4);
                str[olen - 4] = 0;
                printer(arg, " number = %s", str);
@@ -335,8 +336,10 @@
            break;
        }
 
-       if (opt_len > 2)
+       if (opt_len > 2) {
            GETCHAR(delay, pckt);
+           __USE(delay);
+       }
 
        us->us_allowed |= (1 << type);
 
@@ -349,6 +352,7 @@
            dbglog("user callback allowed");
            if (opt_len > 4) {
                GETCHAR(addr_type, pckt);
+               __USE(addr_type);
                memcpy(address, pckt, opt_len - 4);
                address[opt_len - 4] = 0;
                if (address[0])
@@ -471,11 +475,14 @@
        GETCHAR(opt_len, pckt);
        if (opt_len >= 2 && opt_len <= len) {
      
-           if (opt_len > 2)
+           if (opt_len > 2) {
                GETCHAR(delay, pckt);
+               __USE(delay);
+           }
 
            if (opt_len > 4) {
                GETCHAR(addr_type, pckt);
+               __USE(addr_type);
                memcpy(address, pckt, opt_len - 4);
                address[opt_len - 4] = 0;
                if (address[0])
diff -r 428e2f9680b6 -r 0788b391d822 dist/pppd/pppd/utils.c
--- a/dist/pppd/pppd/utils.c    Sun Oct 20 21:13:23 2013 +0000
+++ b/dist/pppd/pppd/utils.c    Sun Oct 20 21:16:05 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: utils.c,v 1.5 2010/04/03 02:08:30 pgoyette Exp $       */
+/*     $NetBSD: utils.c,v 1.6 2013/10/20 21:16:05 christos Exp $       */
 
 /*
  * utils.c - various utility functions used in pppd.
@@ -35,7 +35,7 @@
 #if 0
 #define RCSID  "Id: utils.c,v 1.24 2004/11/04 10:02:26 paulus Exp"
 #else
-__RCSID("$NetBSD: utils.c,v 1.5 2010/04/03 02:08:30 pgoyette Exp $");
+__RCSID("$NetBSD: utils.c,v 1.6 2013/10/20 21:16:05 christos Exp $");
 #endif
 #endif
 
@@ -625,10 +625,9 @@
     char *fmt;
     va_list args;
 {
-    int n;
     char buf[1024];
 
-    n = vslprintf(buf, sizeof(buf), fmt, args);
+    (void)vslprintf(buf, sizeof(buf), fmt, args);
     log_write(level, buf);
 }
 



Home | Main Index | Thread Index | Old Index