summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2013-10-20 21:16:05 +0000
committerchristos <christos@NetBSD.org>2013-10-20 21:16:05 +0000
commit1d51d79cc5f70cccdb206d6cf7cd10ad673e42e7 (patch)
tree7addcaec07e3c1f543b205db10b16d48f3f3cbde /dist
parent1ae77c3bca56958e28883e516979d6fe82f73bdb (diff)
fix unused variable warnings
Diffstat (limited to 'dist')
-rw-r--r--dist/pppd/pppd/auth.c8
-rw-r--r--dist/pppd/pppd/cbcp.c15
-rw-r--r--dist/pppd/pppd/utils.c7
3 files changed, 16 insertions, 14 deletions
diff --git a/dist/pppd/pppd/auth.c b/dist/pppd/pppd/auth.c
index 884c3906fee..9397ff05efa 100644
--- a/dist/pppd/pppd/auth.c
+++ b/dist/pppd/pppd/auth.c
@@ -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 @@ link_required(unit)
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 @@ void start_link(unit)
* 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 --git a/dist/pppd/pppd/cbcp.c b/dist/pppd/pppd/cbcp.c
index c211bbe4a82..cc838ebbefc 100644
--- a/dist/pppd/pppd/cbcp.c
+++ b/dist/pppd/pppd/cbcp.c
@@ -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 @@ cbcp_printpkt(p, plen, printer, arg)
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 @@ cbcp_recvreq(us, pckt, pcktlen)
break;
}
- if (opt_len > 2)
+ if (opt_len > 2) {
GETCHAR(delay, pckt);
+ __USE(delay);
+ }
us->us_allowed |= (1 << type);
@@ -349,6 +352,7 @@ cbcp_recvreq(us, pckt, pcktlen)
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 @@ cbcp_recvack(us, pckt, len)
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 --git a/dist/pppd/pppd/utils.c b/dist/pppd/pppd/utils.c
index 682617f8c89..faa05e866cf 100644
--- a/dist/pppd/pppd/utils.c
+++ b/dist/pppd/pppd/utils.c
@@ -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 @@ logit(level, fmt, args)
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);
}