Fixed multiple smaller compiler warnings

This commit is contained in:
goldsimon 2014-11-07 14:29:53 +01:00
parent a5e748de84
commit ec93b03d8d
10 changed files with 29 additions and 12 deletions

View File

@ -552,7 +552,7 @@ ip_input(struct pbuf *p, struct netif *inp)
if (raw_input(p, inp) == 0)
#endif /* LWIP_RAW */
{
pbuf_header(p, -iphdr_hlen); /* Move to payload, no check necessary. */
pbuf_header(p, -(s16_t)iphdr_hlen); /* Move to payload, no check necessary. */
switch (IPH_PROTO(iphdr)) {
#if LWIP_UDP

View File

@ -179,7 +179,7 @@ struct mem {
* how that space is calculated). */
#ifndef LWIP_RAM_HEAP_POINTER
/** the heap. we need one struct mem at the end and some room for alignment */
u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT];
u8_t ram_heap[MEM_SIZE_ALIGNED + (2U*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT];
#define LWIP_RAM_HEAP_POINTER ram_heap
#endif /* LWIP_RAM_HEAP_POINTER */

View File

@ -64,6 +64,10 @@ extern "C" {
#define PACK_STRUCT_END
#endif /* PACK_STRUCT_END */
#ifndef PACK_STRUCT_STRUCT
#define PACK_STRUCT_STRUCT
#endif /* PACK_STRUCT_STRUCT */
#ifndef PACK_STRUCT_FIELD
#define PACK_STRUCT_FIELD(x) x
#endif /* PACK_STRUCT_FIELD */

View File

@ -57,8 +57,6 @@ struct dhcp
u32_t offered_t0_lease; /* lease period (in seconds) */
u32_t offered_t1_renew; /* recommended renew time (usually 50% of lease period) */
u32_t offered_t2_rebind; /* recommended rebind time (usually 66% of lease period) */
/* @todo: LWIP_DHCP_BOOTP_FILE configuration option?
integrate with possible TFTP-client for booting? */
#if LWIP_DHCP_BOOTP_FILE
ip_addr_t offered_si_addr;
char boot_file_name[DHCP_FILE_LEN];

View File

@ -751,6 +751,13 @@
#define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP))
#endif
/**
* LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name.
*/
#ifndef LWIP_DHCP_BOOTP_FILE
#define LWIP_DHCP_BOOTP_FILE 0
#endif
/*
------------------------------------
---------- AUTOIP options ----------
@ -1767,6 +1774,13 @@
#define PPPOS_SUPPORT PPP_SUPPORT
#endif
/**
* LWIP_PPP_API==1: Enable PPP API (in pppapi.c)
*/
#ifndef LWIP_PPP_API
#define LWIP_PPP_API 0
#endif
#if PPP_SUPPORT
/**
@ -1794,13 +1808,6 @@
#define PPP_IPV6_SUPPORT 0
#endif
/**
* LWIP_PPP_API==1: Enable PPP API (in pppapi.c)
*/
#ifndef LWIP_PPP_API
#define LWIP_PPP_API 0
#endif
/**
* PPP_NOTIFY_PHASE==1: Support PPP notify phase support
*

View File

@ -156,7 +156,7 @@ struct pbuf *pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type,
struct pbuf_custom *p, void *payload_mem,
u16_t payload_mem_len);
#endif /* LWIP_SUPPORT_CUSTOM_PBUF */
void pbuf_realloc(struct pbuf *p, u16_t size);
void pbuf_realloc(struct pbuf *p, u16_t size);
u8_t pbuf_header(struct pbuf *p, s16_t header_size);
void pbuf_ref(struct pbuf *p);
u8_t pbuf_free(struct pbuf *p);

View File

@ -40,6 +40,7 @@
*/
#include "lwip/opt.h"
#if PPP_SUPPORT
#if LWIP_INCLUDED_POLARSSL_DES
#include "netif/ppp/polarssl/des.h"
@ -419,4 +420,5 @@ void des_crypt_ecb( des_context *ctx,
PUT_ULONG_BE( X, output, 4 );
}
#endif /* PPP_SUPPORT */
#endif /* LWIP_INCLUDED_POLARSSL_DES */

View File

@ -40,6 +40,7 @@
*/
#include "lwip/opt.h"
#if PPP_SUPPORT
#if LWIP_INCLUDED_POLARSSL_MD4
#include "netif/ppp/polarssl/md4.h"
@ -276,4 +277,5 @@ void md4( unsigned char *input, int ilen, unsigned char output[16] )
md4_finish( &ctx, output );
}
#endif /* PPP_SUPPORT */
#endif /* LWIP_INCLUDED_POLARSSL_MD4 */

View File

@ -39,6 +39,7 @@
*/
#include "lwip/opt.h"
#if PPP_SUPPORT
#if LWIP_INCLUDED_POLARSSL_MD5
#include "netif/ppp/polarssl/md5.h"
@ -295,4 +296,5 @@ void md5( unsigned char *input, int ilen, unsigned char output[16] )
md5_finish( &ctx, output );
}
#endif /* PPP_SUPPORT */
#endif /* LWIP_INCLUDED_POLARSSL_MD5 */

View File

@ -39,6 +39,7 @@
*/
#include "lwip/opt.h"
#if PPP_SUPPORT
#if LWIP_INCLUDED_POLARSSL_SHA1
#include "netif/ppp/polarssl/sha1.h"
@ -330,4 +331,5 @@ void sha1( unsigned char *input, int ilen, unsigned char output[20] )
sha1_finish( &ctx, output );
}
#endif /* PPP_SUPPORT */
#endif /* LWIP_INCLUDED_POLARSSL_SHA1 */