mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-04 02:39:15 +00:00
PPP, fixed warnings if LWIP_SNMP is disabled
This commit is contained in:
parent
a9c154691b
commit
5097ac05bf
@ -212,6 +212,8 @@ static err_t pppoe_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) {
|
||||
err_t ret;
|
||||
#if LWIP_SNMP
|
||||
u16_t tot_len;
|
||||
#else /* LWIP_SNMP */
|
||||
LWIP_UNUSED_ARG(ppp);
|
||||
#endif /* LWIP_SNMP */
|
||||
|
||||
/* skip address & flags */
|
||||
@ -250,10 +252,12 @@ static err_t pppoe_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short
|
||||
struct pppoe_softc *sc = (struct pppoe_softc *)ctx;
|
||||
struct pbuf *pb;
|
||||
u8_t *pl;
|
||||
err_t err;
|
||||
#if LWIP_SNMP
|
||||
u16_t tot_len;
|
||||
#else /* LWIP_SNMP */
|
||||
LWIP_UNUSED_ARG(ppp);
|
||||
#endif /* LWIP_SNMP */
|
||||
err_t err;
|
||||
|
||||
/* @todo: try to use pbuf_header() here! */
|
||||
pb = pbuf_alloc(PBUF_LINK, PPPOE_HEADERLEN + sizeof(protocol), PBUF_RAM);
|
||||
|
@ -217,6 +217,8 @@ static err_t pppol2tp_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) {
|
||||
err_t ret;
|
||||
#if LWIP_SNMP
|
||||
u16_t tot_len;
|
||||
#else /* LWIP_SNMP */
|
||||
LWIP_UNUSED_ARG(ppp);
|
||||
#endif /* LWIP_SNMP */
|
||||
|
||||
ph = pbuf_alloc(PBUF_TRANSPORT, (u16_t)(PPPOL2TP_OUTPUT_DATA_HEADER_LEN), PBUF_RAM);
|
||||
@ -252,10 +254,12 @@ static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_sh
|
||||
pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx;
|
||||
struct pbuf *pb;
|
||||
u8_t *pl;
|
||||
err_t err;
|
||||
#if LWIP_SNMP
|
||||
u16_t tot_len;
|
||||
#else /* LWIP_SNMP */
|
||||
LWIP_UNUSED_ARG(ppp);
|
||||
#endif /* LWIP_SNMP */
|
||||
err_t err;
|
||||
|
||||
/* @todo: try to use pbuf_header() here! */
|
||||
pb = pbuf_alloc(PBUF_TRANSPORT, PPPOL2TP_OUTPUT_DATA_HEADER_LEN + sizeof(protocol), PBUF_RAM);
|
||||
|
@ -1005,7 +1005,9 @@ pppos_output_append(pppos_pcb *pppos, err_t err, struct pbuf *nb, u8_t c, u8_t a
|
||||
static err_t
|
||||
pppos_output_last(pppos_pcb *pppos, err_t err, struct pbuf *nb, u16_t *fcs)
|
||||
{
|
||||
#if LWIP_SNMP
|
||||
ppp_pcb *ppp = pppos->ppp;
|
||||
#endif /* LWIP_SNMP */
|
||||
|
||||
/* Add FCS and trailing flag. */
|
||||
err = pppos_output_append(pppos, err, nb, ~(*fcs) & 0xFF, 1, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user