From c44ae5e6a7338c96eb463881fe709b2dfaffe568 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sun, 20 May 2012 17:09:16 +1000 Subject: [PATCH] pppd: Eliminate some warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit auth.c: In function ‘start_link’: auth.c:556:11: warning: variable ‘msg’ set but not used [-Wunused-but-set-variable] utils.c: In function ‘logit’: utils.c:655:9: warning: variable ‘n’ set but not used [-Wunused-but-set-variable] sys-linux.c: In function ‘ether_to_eui64’: sys-linux.c:2881:9: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] Signed-off-by: Paul Mackerras --- pppd/auth.c | 4 ---- pppd/sys-linux.c | 2 +- pppd/utils.c | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pppd/auth.c b/pppd/auth.c index 883b7f5..7b269b8 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -553,13 +553,10 @@ link_required(unit) void start_link(unit) int unit; { - char *msg; - new_phase(PHASE_SERIALCONN); hungup = 0; devfd = the_channel->connect(); - msg = "Connect script failed"; if (devfd < 0) goto fail; @@ -572,7 +569,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/pppd/sys-linux.c b/pppd/sys-linux.c index 4fe221d..2540c4f 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -2878,7 +2878,7 @@ ether_to_eui64(eui64_t *p_eui64) /* * And convert the EUI-48 into EUI-64, per RFC 2472 [sec 4.1] */ - ptr = ifr.ifr_hwaddr.sa_data; + ptr = (unsigned char *) ifr.ifr_hwaddr.sa_data; p_eui64->e8[0] = ptr[0] | 0x02; p_eui64->e8[1] = ptr[1]; p_eui64->e8[2] = ptr[2]; diff --git a/pppd/utils.c b/pppd/utils.c index 5c9ba64..eb771a5 100644 --- a/pppd/utils.c +++ b/pppd/utils.c @@ -652,10 +652,9 @@ logit(level, fmt, args) char *fmt; va_list args; { - int n; char buf[1024]; - n = vslprintf(buf, sizeof(buf), fmt, args); + vslprintf(buf, sizeof(buf), fmt, args); log_write(level, buf); } -- 2.39.2