diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-12-08 22:06:54 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-12-08 22:06:54 +0000 |
commit | 78d6a5000398cc4813a6644ab525ab32a056d066 (patch) | |
tree | d3ba47ff2e31fb63a1183c2e49d04bfac3cccac6 /c/src/libnetworking/modem | |
parent | 2000-12-06 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-78d6a5000398cc4813a6644ab525ab32a056d066.tar.bz2 |
2000-12-08 Joel Sherrill <joel@OARcorp.com>
* libc/linkaddr.c: Initialized variable to remove warning.
* modem/ppp.c, modem/ppp_tty.c: Made numerous variable declarations
conditional on PPP_COMPRESS and PPP_FILTER. Commented out variables
that were not used because the code using them was commented out.
Removed totally unused variables.
* modem/pppcompress.c: Added parentheses to avoid warnings.
* pppd/pppmain.c: Removed numerous warnings.
Diffstat (limited to 'c/src/libnetworking/modem')
-rw-r--r-- | c/src/libnetworking/modem/ppp.c | 20 | ||||
-rw-r--r-- | c/src/libnetworking/modem/ppp_tty.c | 17 | ||||
-rw-r--r-- | c/src/libnetworking/modem/pppcompress.c | 6 |
3 files changed, 21 insertions, 22 deletions
diff --git a/c/src/libnetworking/modem/ppp.c b/c/src/libnetworking/modem/ppp.c index 9b31b678fb..589089822d 100644 --- a/c/src/libnetworking/modem/ppp.c +++ b/c/src/libnetworking/modem/ppp.c @@ -134,8 +134,10 @@ extern struct ifqueue ipintrq; static int pppsioctl __P((struct ifnet *, int, caddr_t)); static void ppp_requeue __P((struct ppp_softc *)); +#ifdef PPP_COMPRESS static void ppp_ccp __P((struct ppp_softc *, struct mbuf *m, int rcvd)); static void ppp_ccp_closed __P((struct ppp_softc *)); +#endif static void ppp_inproc __P((struct ppp_softc *, struct mbuf *)); static void pppdumpm __P((struct mbuf *m0)); @@ -193,7 +195,8 @@ int rtems_ppp_driver_attach (struct rtems_bsdnet_ifconfig *config, { register struct ppp_softc *sc; register int i = 0; - extern void (*netisrs[])__P((void)); +/* XXX unused in rtems + extern void (*netisrs[])__P((void)); */ for (sc = ppp_softc; i < NPPP; sc++) { sc->sc_if.if_name = "ppp"; @@ -336,17 +339,19 @@ pppioctl(sc, cmd, data, flag, p) int flag; struct proc *p; { - int s, error, flags, mru, nb, npx; - struct ppp_option_data *odp; - struct compressor **cp; + int s, flags, mru, npx; struct npioctl *npi; time_t t; #ifdef PPP_FILTER + int error; struct bpf_program *bp, *nbp; struct bpf_insn *newcode, *oldcode; int newcodelen; #endif /* PPP_FILTER */ #ifdef PPP_COMPRESS + int nb; + struct ppp_option_data *odp; + struct compressor **cp; u_char ccp_option[CCP_MAX_OPTION_LENGTH]; #endif @@ -1016,7 +1021,7 @@ void pppintr() { struct ppp_softc *sc; - int i, s, s2; + int i, s2; struct mbuf *m; sc = ppp_softc; @@ -1189,7 +1194,10 @@ ppp_inproc(sc, m) struct ifqueue *inq; int s, ilen, xlen, proto, rv; u_char *cp, adrs, ctrl; - struct mbuf *mp, *dmp = NULL; + struct mbuf *mp; +#ifdef PPP_COMPRESS + *dmp = NULL; +#endif u_char *iphdr; u_int hlen; diff --git a/c/src/libnetworking/modem/ppp_tty.c b/c/src/libnetworking/modem/ppp_tty.c index 8e2dd1ddc5..27fff62a29 100644 --- a/c/src/libnetworking/modem/ppp_tty.c +++ b/c/src/libnetworking/modem/ppp_tty.c @@ -303,8 +303,6 @@ static void pppasyncrelinq(sc) struct ppp_softc *sc; { - int s; - if (sc->sc_outm) { m_freem(sc->sc_outm); sc->sc_outm = NULL; @@ -322,7 +320,7 @@ pppasyncrelinq(sc) /* * Line specific (tty) read routine. */ -pppread(struct rtems_termios_tty *tty, +int pppread(struct rtems_termios_tty *tty, rtems_libio_rw_args_t *rw_args) { char *buffer; @@ -330,8 +328,6 @@ pppread(struct rtems_termios_tty *tty, rtems_status_code status; struct mbuf *m, *m0; - register int s; - int error = 0; rtems_interval ticks; register struct ppp_softc *sc = (struct ppp_softc *)tty->t_sc; buffer = rw_args->buffer; @@ -380,7 +376,7 @@ int pppwrite(struct rtems_termios_tty *tty, rtems_libio_rw_args_t *rw_args) { - int count,len; + int len; char *out_buffer; int n,maximum; @@ -574,15 +570,11 @@ pppasyncstart(sc) void modem_sendpacket(struct rtems_termios_tty *tty) { - struct mbuf *l = NULL; - rtems_unsigned16 status; - int curr; register struct mbuf *m; register int len; register u_char *start, *stop, *cp; - int n, ndone, done, idle; + int n, ndone, done; struct mbuf *m2; - int s; char c; register struct ppp_softc *sc=tty->t_sc; @@ -679,7 +671,7 @@ void modem_sendpacket(struct rtems_termios_tty *tty) */ done = len == 0; if (done && m->m_next == NULL) { - u_char *p, *q; + u_char *p; int c; u_char endseq[8]; @@ -791,7 +783,6 @@ ppp_timeout(x) struct rtems_termios_tty *tty = ((struct rtems_termios_tty *)x); struct ppp_softc *sc = tty->t_sc; struct rtems_termios_tty *tp = (struct rtems_termios_tty *) sc->sc_devp; - int s; sc->sc_flags &= ~SC_TIMEOUT; pppstart(tp); diff --git a/c/src/libnetworking/modem/pppcompress.c b/c/src/libnetworking/modem/pppcompress.c index a7d2734c8d..aebe441fd3 100644 --- a/c/src/libnetworking/modem/pppcompress.c +++ b/c/src/libnetworking/modem/pppcompress.c @@ -278,19 +278,19 @@ vj_compress_tcp(m, ip, comp, compress_cid) * with it. */ goto uncompressed; - if (deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win))) { + if ((deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win)))) { ENCODE(deltaS); changes |= NEW_W; } - if (deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack)) { + if ((deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack))) { if (deltaA > 0xffff) goto uncompressed; ENCODE(deltaA); changes |= NEW_A; } - if (deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq)) { + if ((deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq))) { if (deltaS > 0xffff) goto uncompressed; ENCODE(deltaS); |