mirror of
https://github.com/pvvx/RTL00MP3.git
synced 2025-07-31 12:41:06 +00:00
update -Wall -Werror
This commit is contained in:
parent
2c29a376ba
commit
7cb9553f73
102 changed files with 3686 additions and 3504 deletions
|
|
@ -91,9 +91,12 @@ static void arp_timer(void *arg);
|
|||
|
||||
#if LWIP_NETIF_HOSTNAME
|
||||
char lwip_host_name[NET_IF_NUM][LWIP_NETIF_HOSTNAME_SIZE] = {
|
||||
DEF_HOSTNAME"0",
|
||||
DEF_HOSTNAME"1",
|
||||
DEF_HOSTNAME"2"
|
||||
{ DEF_HOSTNAME"0" },
|
||||
{ DEF_HOSTNAME"1" }
|
||||
#if NET_IF_NUM > 2
|
||||
,{ DEF_HOSTNAME "2" }
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include "lwip/err.h"
|
||||
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
|
||||
static const char *err_strerr[] = {
|
||||
"Ok", /* ERR_OK 0 */
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ struct lwip_select_cb {
|
|||
struct lwip_setgetsockopt_data {
|
||||
/** socket struct for which to change options */
|
||||
struct lwip_sock *sock;
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
/** socket index for which to change options */
|
||||
int s;
|
||||
#endif /* LWIP_DEBUG */
|
||||
|
|
@ -1641,7 +1641,7 @@ lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen)
|
|||
|
||||
/* Now do the actual option processing */
|
||||
data.sock = sock;
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
data.s = s;
|
||||
#endif /* LWIP_DEBUG */
|
||||
data.level = level;
|
||||
|
|
@ -1662,7 +1662,7 @@ static void
|
|||
lwip_getsockopt_internal(void *arg)
|
||||
{
|
||||
struct lwip_sock *sock;
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
int s;
|
||||
#endif /* LWIP_DEBUG */
|
||||
int level, optname;
|
||||
|
|
@ -1673,7 +1673,7 @@ lwip_getsockopt_internal(void *arg)
|
|||
|
||||
data = (struct lwip_setgetsockopt_data*)arg;
|
||||
sock = data->sock;
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
s = data->s;
|
||||
#endif /* LWIP_DEBUG */
|
||||
level = data->level;
|
||||
|
|
@ -2059,7 +2059,7 @@ lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t opt
|
|||
|
||||
/* Now do the actual option processing */
|
||||
data.sock = sock;
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
data.s = s;
|
||||
#endif /* LWIP_DEBUG */
|
||||
data.level = level;
|
||||
|
|
@ -2080,7 +2080,7 @@ static void
|
|||
lwip_setsockopt_internal(void *arg)
|
||||
{
|
||||
struct lwip_sock *sock;
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
int s;
|
||||
#endif /* LWIP_DEBUG */
|
||||
int level, optname;
|
||||
|
|
@ -2091,7 +2091,7 @@ lwip_setsockopt_internal(void *arg)
|
|||
|
||||
data = (struct lwip_setgetsockopt_data*)arg;
|
||||
sock = data->sock;
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
s = data->s;
|
||||
#endif /* LWIP_DEBUG */
|
||||
level = data->level;
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ err_t
|
|||
tcpip_apimsg(struct api_msg *apimsg)
|
||||
{
|
||||
struct tcpip_msg msg;
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
/* catch functions that don't set err */
|
||||
apimsg->msg.err = ERR_VAL;
|
||||
#endif
|
||||
|
|
@ -339,7 +339,7 @@ tcpip_apimsg(struct api_msg *apimsg)
|
|||
err_t
|
||||
tcpip_apimsg_lock(struct api_msg *apimsg)
|
||||
{
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
/* catch functions that don't set err */
|
||||
apimsg->msg.err = ERR_VAL;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1008,7 +1008,7 @@ dhcp_bind(struct netif *netif)
|
|||
|
||||
ip_addr_copy(gw_addr, dhcp->offered_gw_addr);
|
||||
/* gateway address not given? */
|
||||
if (ip_addr_isany(&gw_addr)) {
|
||||
if (gw_addr.addr == IPADDR_ANY) {
|
||||
/* copy network address */
|
||||
ip_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask);
|
||||
/* use first host address on network as gateway */
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ void
|
|||
icmp_input(struct pbuf *p, struct netif *inp)
|
||||
{
|
||||
u8_t type;
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
u8_t code;
|
||||
#endif /* LWIP_DEBUG */
|
||||
struct icmp_echo_hdr *iecho;
|
||||
|
|
@ -96,7 +96,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
|||
}
|
||||
|
||||
type = *((u8_t *)p->payload);
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
code = *(((u8_t *)p->payload)+1);
|
||||
#endif /* LWIP_DEBUG */
|
||||
switch (type) {
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ igmp_init(void)
|
|||
IP4_ADDR(&allrouters, 224, 0, 0, 2);
|
||||
}
|
||||
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
/**
|
||||
* Dump global IGMP groups list
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -128,8 +128,9 @@ struct netif *
|
|||
ip_route(ip_addr_t *dest)
|
||||
{
|
||||
struct netif *netif;
|
||||
#if CONFIG_ETHERNET
|
||||
struct netif *last_netif = NULL;
|
||||
|
||||
#endif
|
||||
#ifdef LWIP_HOOK_IP4_ROUTE
|
||||
netif = LWIP_HOOK_IP4_ROUTE(dest);
|
||||
if (netif != NULL) {
|
||||
|
|
@ -498,7 +499,7 @@ ip_input(struct pbuf *p, struct netif *inp)
|
|||
/* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */
|
||||
#if IP_ACCEPT_LINK_LAYER_ADDRESSING
|
||||
/* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */
|
||||
if (check_ip_src && !ip_addr_isany(¤t_iphdr_src))
|
||||
if (check_ip_src && current_iphdr_src.addr != IPADDR_ANY)
|
||||
#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */
|
||||
{ if ((ip_addr_isbroadcast(¤t_iphdr_src, inp)) ||
|
||||
(ip_addr_ismulticast(¤t_iphdr_src))) {
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ static const u16_t memp_num[MEMP_MAX] = {
|
|||
};
|
||||
|
||||
/** This array holds a textual description of each pool. */
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
static const char *memp_desc[MEMP_MAX] = {
|
||||
#define LWIP_MEMPOOL(name,num,size,desc) (desc),
|
||||
#include "lwip/memp_std.h"
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ struct stats_ lwip_stats;
|
|||
|
||||
void stats_init(void)
|
||||
{
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
#if MEMP_STATS
|
||||
const char * memp_names[] = {
|
||||
#define LWIP_MEMPOOL(name,num,size,desc) desc,
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ etharp_free_entry(int i)
|
|||
}
|
||||
/* recycle entry for re-use */
|
||||
arp_table[i].state = ETHARP_STATE_EMPTY;
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) && (LWIP_DEBUG != 0)
|
||||
/* for debugging, clean out the complete entry */
|
||||
arp_table[i].ctime = 0;
|
||||
arp_table[i].netif = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue