minor compiler warning fixes and coding style

This commit is contained in:
goldsimon 2015-09-17 11:00:21 +02:00
parent c1c1754171
commit 726af89168
4 changed files with 43 additions and 39 deletions

View File

@ -475,7 +475,7 @@ static void
dns_init_local(void) dns_init_local(void)
{ {
#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC && defined(DNS_LOCAL_HOSTLIST_INIT) #if DNS_LOCAL_HOSTLIST_IS_DYNAMIC && defined(DNS_LOCAL_HOSTLIST_INIT)
int i; size_t i;
struct local_hostlist_entry *entry; struct local_hostlist_entry *entry;
/* Dynamic: copy entries from DNS_LOCAL_HOSTLIST_INIT to list */ /* Dynamic: copy entries from DNS_LOCAL_HOSTLIST_INIT to list */
struct local_hostlist_entry local_hostlist_init[] = DNS_LOCAL_HOSTLIST_INIT; struct local_hostlist_entry local_hostlist_init[] = DNS_LOCAL_HOSTLIST_INIT;

View File

@ -456,6 +456,10 @@ autoip_tmr(void)
} }
} }
break; break;
default:
/* nothing to do in other states */
break;
} }
} }
/* proceed to next network interface */ /* proceed to next network interface */

View File

@ -769,7 +769,7 @@ ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest)
} }
/* fill in the IP header */ /* fill in the IP header */
SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN);
iphdr = rambuf->payload; iphdr = (struct ip_hdr*)rambuf->payload;
#else /* LWIP_NETIF_TX_SINGLE_PBUF */ #else /* LWIP_NETIF_TX_SINGLE_PBUF */
/* When not using a static buffer, create a chain of pbufs. /* When not using a static buffer, create a chain of pbufs.
* The first will be a PBUF_RAM holding the link and IP header. * The first will be a PBUF_RAM holding the link and IP header.

View File

@ -124,7 +124,7 @@ stats_display_mem(struct stats_mem *mem, const char *name)
void void
stats_display_memp(struct stats_mem *mem, int index) stats_display_memp(struct stats_mem *mem, int index)
{ {
char * memp_names[] = { const char * memp_names[] = {
#define LWIP_MEMPOOL(name,num,size,desc) desc, #define LWIP_MEMPOOL(name,num,size,desc) desc,
#include "lwip/memp_std.h" #include "lwip/memp_std.h"
}; };