Fix shadowing warning (when compiling in C++) in TCPIP call API. Reported by Freddie Chopin.

This commit is contained in:
Dirk Ziegelmeier 2016-03-31 19:52:20 +02:00
parent c8b65f6c1d
commit 141aeaab3d
6 changed files with 19 additions and 19 deletions

View File

@ -48,7 +48,7 @@
* Call netif_add() inside the tcpip_thread context. * Call netif_add() inside the tcpip_thread context.
*/ */
static err_t static err_t
netifapi_do_netif_add(struct tcpip_api_call *m) netifapi_do_netif_add(struct tcpip_api_call_data *m)
{ {
struct netifapi_msg *msg = (struct netifapi_msg*)m; struct netifapi_msg *msg = (struct netifapi_msg*)m;
@ -72,7 +72,7 @@ netifapi_do_netif_add(struct tcpip_api_call *m)
* Call netif_set_addr() inside the tcpip_thread context. * Call netif_set_addr() inside the tcpip_thread context.
*/ */
static err_t static err_t
netifapi_do_netif_set_addr(struct tcpip_api_call *m) netifapi_do_netif_set_addr(struct tcpip_api_call_data *m)
{ {
struct netifapi_msg *msg = (struct netifapi_msg*)m; struct netifapi_msg *msg = (struct netifapi_msg*)m;
@ -89,7 +89,7 @@ netifapi_do_netif_set_addr(struct tcpip_api_call *m)
* tcpip_thread context. * tcpip_thread context.
*/ */
static err_t static err_t
netifapi_do_netif_common(struct tcpip_api_call *m) netifapi_do_netif_common(struct tcpip_api_call_data *m)
{ {
struct netifapi_msg *msg = (struct netifapi_msg*)m; struct netifapi_msg *msg = (struct netifapi_msg*)m;

View File

@ -46,7 +46,7 @@
* Call ppp_set_default() inside the tcpip_thread context. * Call ppp_set_default() inside the tcpip_thread context.
*/ */
static err_t static err_t
pppapi_do_ppp_set_default(struct tcpip_api_call *m) pppapi_do_ppp_set_default(struct tcpip_api_call_data *m)
{ {
struct pppapi_msg *msg = (struct pppapi_msg *)m; struct pppapi_msg *msg = (struct pppapi_msg *)m;
@ -71,7 +71,7 @@ pppapi_set_default(ppp_pcb *pcb)
* Call ppp_set_auth() inside the tcpip_thread context. * Call ppp_set_auth() inside the tcpip_thread context.
*/ */
static err_t static err_t
pppapi_do_ppp_set_auth(struct tcpip_api_call *m) pppapi_do_ppp_set_auth(struct tcpip_api_call_data *m)
{ {
struct pppapi_msg *msg = (struct pppapi_msg *)m; struct pppapi_msg *msg = (struct pppapi_msg *)m;
@ -128,7 +128,7 @@ pppapi_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_pha
* Call pppos_create() inside the tcpip_thread context. * Call pppos_create() inside the tcpip_thread context.
*/ */
static err_t static err_t
pppapi_do_pppos_create(struct tcpip_api_call *m) pppapi_do_pppos_create(struct tcpip_api_call_data *m)
{ {
struct pppapi_msg *msg = (struct pppapi_msg *)m; struct pppapi_msg *msg = (struct pppapi_msg *)m;
@ -162,7 +162,7 @@ pppapi_pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb,
* Call pppoe_create() inside the tcpip_thread context. * Call pppoe_create() inside the tcpip_thread context.
*/ */
static err_t static err_t
pppapi_do_pppoe_create(struct tcpip_api_call *m) pppapi_do_pppoe_create(struct tcpip_api_call_data *m)
{ {
struct pppapi_msg *msg = (struct pppapi_msg *)m; struct pppapi_msg *msg = (struct pppapi_msg *)m;
@ -200,7 +200,7 @@ pppapi_pppoe_create(struct netif *pppif, struct netif *ethif, const char *servic
* Call pppol2tp_create() inside the tcpip_thread context. * Call pppol2tp_create() inside the tcpip_thread context.
*/ */
static err_t static err_t
pppapi_do_pppol2tp_create(struct tcpip_api_call *m) pppapi_do_pppol2tp_create(struct tcpip_api_call_data *m)
{ {
struct pppapi_msg *msg = (struct pppapi_msg *)m; struct pppapi_msg *msg = (struct pppapi_msg *)m;
@ -247,7 +247,7 @@ pppapi_pppol2tp_create(struct netif *pppif, struct netif *netif, ip_addr_t *ipad
* Call ppp_connect() inside the tcpip_thread context. * Call ppp_connect() inside the tcpip_thread context.
*/ */
static err_t static err_t
pppapi_do_ppp_connect(struct tcpip_api_call *m) pppapi_do_ppp_connect(struct tcpip_api_call_data *m)
{ {
struct pppapi_msg *msg = (struct pppapi_msg *)m; struct pppapi_msg *msg = (struct pppapi_msg *)m;
@ -299,7 +299,7 @@ pppapi_listen(ppp_pcb *pcb, struct ppp_addrs *addrs)
* Call ppp_close() inside the tcpip_thread context. * Call ppp_close() inside the tcpip_thread context.
*/ */
static err_t static err_t
pppapi_do_ppp_close(struct tcpip_api_call *m) pppapi_do_ppp_close(struct tcpip_api_call_data *m)
{ {
struct pppapi_msg *msg = (struct pppapi_msg *)m; struct pppapi_msg *msg = (struct pppapi_msg *)m;
@ -324,7 +324,7 @@ pppapi_close(ppp_pcb *pcb, u8_t nocarrier)
* Call ppp_free() inside the tcpip_thread context. * Call ppp_free() inside the tcpip_thread context.
*/ */
static err_t static err_t
pppapi_do_ppp_free(struct tcpip_api_call *m) pppapi_do_ppp_free(struct tcpip_api_call_data *m)
{ {
struct pppapi_msg *msg = (struct pppapi_msg *)m; struct pppapi_msg *msg = (struct pppapi_msg *)m;
@ -348,7 +348,7 @@ pppapi_free(ppp_pcb *pcb)
* Call ppp_ioctl() inside the tcpip_thread context. * Call ppp_ioctl() inside the tcpip_thread context.
*/ */
static err_t static err_t
pppapi_do_ppp_ioctl(struct tcpip_api_call *m) pppapi_do_ppp_ioctl(struct tcpip_api_call_data *m)
{ {
struct pppapi_msg *msg = (struct pppapi_msg *)m; struct pppapi_msg *msg = (struct pppapi_msg *)m;

View File

@ -359,7 +359,7 @@ tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem)
* @return Return value from tcpip_api_call_fn * @return Return value from tcpip_api_call_fn
*/ */
err_t err_t
tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call *call) tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call)
{ {
#if LWIP_TCPIP_CORE_LOCKING #if LWIP_TCPIP_CORE_LOCKING
err_t err; err_t err;

View File

@ -51,7 +51,7 @@ typedef void (*netifapi_void_fn)(struct netif *netif);
typedef err_t (*netifapi_errt_fn)(struct netif *netif); typedef err_t (*netifapi_errt_fn)(struct netif *netif);
struct netifapi_msg { struct netifapi_msg {
struct tcpip_api_call call; struct tcpip_api_call_data call;
struct netif *netif; struct netif *netif;
union { union {
struct { struct {

View File

@ -108,7 +108,7 @@ struct pppapi_msg_msg {
}; };
struct pppapi_msg { struct pppapi_msg {
struct tcpip_api_call call; struct tcpip_api_call_data call;
struct pppapi_msg_msg msg; struct pppapi_msg_msg msg;
}; };

View File

@ -97,7 +97,7 @@ extern sys_mutex_t lock_tcpip_core;
err_t tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem); err_t tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem);
struct tcpip_api_call struct tcpip_api_call_data
{ {
#if !LWIP_TCPIP_CORE_LOCKING #if !LWIP_TCPIP_CORE_LOCKING
err_t err; err_t err;
@ -108,8 +108,8 @@ struct tcpip_api_call
u8_t dummy; /* avoid empty struct :-( */ u8_t dummy; /* avoid empty struct :-( */
#endif /* !LWIP_TCPIP_CORE_LOCKING */ #endif /* !LWIP_TCPIP_CORE_LOCKING */
}; };
typedef err_t (*tcpip_api_call_fn)(struct tcpip_api_call* call); typedef err_t (*tcpip_api_call_fn)(struct tcpip_api_call_data* call);
err_t tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call *call); err_t tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call);
enum tcpip_msg_type { enum tcpip_msg_type {
TCPIP_MSG_API, TCPIP_MSG_API,
@ -132,7 +132,7 @@ struct tcpip_msg {
} api_msg; } api_msg;
struct { struct {
tcpip_api_call_fn function; tcpip_api_call_fn function;
struct tcpip_api_call *arg; struct tcpip_api_call_data *arg;
sys_sem_t *sem; sys_sem_t *sem;
} api_call; } api_call;
struct { struct {