From cd140b110504433e007f591e7c606c07ff66ce6f Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Thu, 9 Apr 2020 03:05:30 +0200 Subject: [PATCH] Revert "ppp: fix compiling with CCP_SUPPORT=1 but MPPE_SUPPORT=0" This reverts commit 6e7ea92d56e43de65c46396b82ceebce2b95e8af. We better forbid building configurations that does not make sense instead of bloating the code with more ifdef. Here building CCP support without adding any compressor support serve no real use case. --- src/netif/ppp/ccp.c | 6 ------ src/netif/ppp/ppp.c | 4 ---- 2 files changed, 10 deletions(-) diff --git a/src/netif/ppp/ccp.c b/src/netif/ppp/ccp.c index 8f615fb0..6c2dadc9 100644 --- a/src/netif/ppp/ccp.c +++ b/src/netif/ppp/ccp.c @@ -246,7 +246,6 @@ static const fsm_callbacks ccp_callbacks = { * Do we want / did we get any compression? */ static int ccp_anycompress(ccp_options *opt) { - LWIP_UNUSED_ARG(opt); return (0 #if DEFLATE_SUPPORT || (opt)->deflate @@ -744,7 +743,6 @@ static void ccp_resetci(fsm *f) { static int ccp_cilen(fsm *f) { ppp_pcb *pcb = f->pcb; ccp_options *go = &pcb->ccp_gotoptions; - LWIP_UNUSED_ARG(go); return 0 #if BSDCOMPRESS_SUPPORT @@ -840,8 +838,6 @@ static int ccp_ackci(fsm *f, u_char *p, int len) { #if BSDCOMPRESS_SUPPORT || PREDICTOR_SUPPORT u_char *p0 = p; #endif /* BSDCOMPRESS_SUPPORT || PREDICTOR_SUPPORT */ - LWIP_UNUSED_ARG(p); - LWIP_UNUSED_ARG(go); #if MPPE_SUPPORT if (go->mppe) { @@ -1026,7 +1022,6 @@ static int ccp_rejci(fsm *f, u_char *p, int len) { ppp_pcb *pcb = f->pcb; ccp_options *go = &pcb->ccp_gotoptions; ccp_options try_; /* options to request next time */ - LWIP_UNUSED_ARG(p); try_ = *go; @@ -1122,7 +1117,6 @@ static int ccp_reqci(fsm *f, u_char *p, int *lenp, int dont_nak) { u8_t rej_for_ci_mppe = 1; /* Are we rejecting based on a bad/missing */ /* CI_MPPE, or due to other options? */ #endif /* MPPE_SUPPORT */ - LWIP_UNUSED_ARG(ao); ret = CONFACK; retp = p0 = p; diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 10531624..b847609c 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -840,9 +840,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { #endif /* MPPE_SUPPORT */ if (protocol == PPP_COMP) { -#if MPPE_SUPPORT u8_t *pl; -#endif switch (pcb->ccp_receive_method) { #if MPPE_SUPPORT @@ -857,7 +855,6 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { goto drop; /* Cannot really happen, we only negotiate what we are able to do */ } -#if MPPE_SUPPORT /* Assume no PFC */ if (pb->len < 2) { goto drop; @@ -872,7 +869,6 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { protocol = (pl[0] << 8) | pl[1]; pbuf_remove_header(pb, 2); } -#endif /* MPPE_SUPPORT */ } #endif /* CCP_SUPPORT */