mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 05:10:40 +00:00
PPP, PPPoE: fix build when PPPOE_SCNAME_SUPPORT is defined
lwip/src/netif/ppp/pppoe.c:768:24: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=poin$
l1 = (int)strlen(sc->sc_service_name);
lwip/src/netif/ppp/pppoe.c:772:24: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=poin$
l2 = (int)strlen(sc->sc_concentrator_name);
sc->sc_service_name and sc->sc_concentrator_name are best defined as
char* because there are passed to libc strings functions which expect
a char*.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
(cherry picked from commit 7eab5947af
)
This commit is contained in:
parent
d1f920a7d1
commit
e6d05db86f
@ -0,0 +1,40 @@
|
||||
From 96548ede2b9fcf077e579098b1db9ed397bc7032 Mon Sep 17 00:00:00 2001
|
||||
From: Jacob Kroon <jacob.kroon@gmail.com>
|
||||
Date: Tue, 18 Dec 2018 22:08:03 +0100
|
||||
Subject: [PATCH] PPP, PPPoE: fix build when PPPOE_SCNAME_SUPPORT is defined
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
lwip/src/netif/ppp/pppoe.c:768:24: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=poin$
|
||||
l1 = (int)strlen(sc->sc_service_name);
|
||||
lwip/src/netif/ppp/pppoe.c:772:24: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=poin$
|
||||
l2 = (int)strlen(sc->sc_concentrator_name);
|
||||
|
||||
sc->sc_service_name and sc->sc_concentrator_name are best defined as
|
||||
char* because there are passed to libc strings functions which expect
|
||||
a char*.
|
||||
|
||||
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
|
||||
---
|
||||
src/include/netif/ppp/pppoe.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/include/netif/ppp/pppoe.h b/src/include/netif/ppp/pppoe.h
|
||||
index d5d8a164..e2d20a2b 100644
|
||||
--- a/src/include/netif/ppp/pppoe.h
|
||||
+++ b/src/include/netif/ppp/pppoe.h
|
||||
@@ -150,8 +150,8 @@ struct pppoe_softc {
|
||||
u8_t sc_state; /* discovery phase or session connected */
|
||||
|
||||
#if PPPOE_SCNAME_SUPPORT
|
||||
- u8_t *sc_service_name; /* if != NULL: requested name of service */
|
||||
- u8_t *sc_concentrator_name; /* if != NULL: requested concentrator id */
|
||||
+ char *sc_service_name; /* if != NULL: requested name of service */
|
||||
+ char *sc_concentrator_name; /* if != NULL: requested concentrator id */
|
||||
#endif /* PPPOE_SCNAME_SUPPORT */
|
||||
u8_t sc_ac_cookie[PPPOE_MAX_AC_COOKIE_LEN]; /* content of AC cookie we must echo back */
|
||||
u8_t sc_ac_cookie_len; /* length of cookie data */
|
||||
--
|
||||
2.20.1
|
||||
|
@ -150,8 +150,8 @@ struct pppoe_softc {
|
||||
u8_t sc_state; /* discovery phase or session connected */
|
||||
|
||||
#if PPPOE_SCNAME_SUPPORT
|
||||
u8_t *sc_service_name; /* if != NULL: requested name of service */
|
||||
u8_t *sc_concentrator_name; /* if != NULL: requested concentrator id */
|
||||
char *sc_service_name; /* if != NULL: requested name of service */
|
||||
char *sc_concentrator_name; /* if != NULL: requested concentrator id */
|
||||
#endif /* PPPOE_SCNAME_SUPPORT */
|
||||
u8_t sc_ac_cookie[PPPOE_MAX_AC_COOKIE_LEN]; /* content of AC cookie we must echo back */
|
||||
u8_t sc_ac_cookie_len; /* length of cookie data */
|
||||
|
Loading…
Reference in New Issue
Block a user