Module Name: src
Committed By: christos
Date: Sun Oct 20 21:16:05 UTC 2013
Modified Files:
src/dist/pppd/pppd: auth.c cbcp.c utils.c
Log Message:
fix unused variable warnings
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/dist/pppd/pppd/auth.c
cvs rdiff -u -r1.3 -r1.4 src/dist/pppd/pppd/cbcp.c
cvs rdiff -u -r1.5 -r1.6 src/dist/pppd/pppd/utils.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/dist/pppd/pppd/auth.c
diff -u src/dist/pppd/pppd/auth.c:1.8 src/dist/pppd/pppd/auth.c:1.9
--- src/dist/pppd/pppd/auth.c:1.8 Fri Oct 7 06:42:54 2011
+++ src/dist/pppd/pppd/auth.c Sun Oct 20 17:16:05 2013
@@ -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;
Index: src/dist/pppd/pppd/cbcp.c
diff -u src/dist/pppd/pppd/cbcp.c:1.3 src/dist/pppd/pppd/cbcp.c:1.4
--- src/dist/pppd/pppd/cbcp.c:1.3 Thu Jun 29 17:50:17 2006
+++ src/dist/pppd/pppd/cbcp.c Sun Oct 20 17:16:05 2013
@@ -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])
Index: src/dist/pppd/pppd/utils.c
diff -u src/dist/pppd/pppd/utils.c:1.5 src/dist/pppd/pppd/utils.c:1.6
--- src/dist/pppd/pppd/utils.c:1.5 Fri Apr 2 22:08:30 2010
+++ src/dist/pppd/pppd/utils.c Sun Oct 20 17:16:05 2013
@@ -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);
}