diff --git a/src/netif/ppp/pppoe.c b/src/netif/ppp/pppoe.c index 48251f4e..2394baa7 100644 --- a/src/netif/ppp/pppoe.c +++ b/src/netif/ppp/pppoe.c @@ -389,7 +389,9 @@ pppoe_disc_input(struct netif *netif, struct pbuf *pb) u16_t tag, len; u16_t session, plen; struct pppoe_softc *sc; - const char *err_msg; +#if PPP_DEBUG + const char *err_msg = NULL; +#endif /* PPP_DEBUG */ u8_t *ac_cookie; u16_t ac_cookie_len; #ifdef PPPOE_SERVER @@ -409,7 +411,6 @@ pppoe_disc_input(struct netif *netif, struct pbuf *pb) pb = ppp_singlebuf(pb); - err_msg = NULL; if (pb->len < sizeof(*ethhdr)) { goto done; } @@ -479,6 +480,7 @@ pppoe_disc_input(struct netif *netif, struct pbuf *pb) ac_cookie_len = len; } break; +#if PPP_DEBUG case PPPOE_TAG_SNAME_ERR: err_msg = "SERVICE NAME ERROR"; break; @@ -488,6 +490,7 @@ pppoe_disc_input(struct netif *netif, struct pbuf *pb) case PPPOE_TAG_GENERIC_ERR: err_msg = "GENERIC ERROR"; break; +#endif /* PPP_DEBUG */ default: break; } diff --git a/src/netif/ppp/pppos.c b/src/netif/ppp/pppos.c index 9d474ca8..5fc48ede 100644 --- a/src/netif/ppp/pppos.c +++ b/src/netif/ppp/pppos.c @@ -866,6 +866,9 @@ static void pppos_vjc_config(ppp_pcb *ppp, void *ctx, int vjcomp, int cidcomp, int maxcid) { pppos_pcb *pppos = (pppos_pcb *)ctx; +#if !PPP_DEBUG + LWIP_UNUSED_ARG(ppp); +#endif /* !PPP_DEBUG */ pppos->vj_enabled = vjcomp; pppos->vj_comp.compressSlot = cidcomp; @@ -879,6 +882,9 @@ pppos_netif_input(ppp_pcb *ppp, void *ctx, struct pbuf *p, u16_t protocol) { int ret; pppos_pcb *pppos = (pppos_pcb *)ctx; +#if !PPP_DEBUG + LWIP_UNUSED_ARG(ppp); +#endif /* !PPP_DEBUG */ switch(protocol) { case PPP_VJC_COMP: /* VJ compressed TCP */