update -Wall

This commit is contained in:
pvvx 2017-09-06 14:34:28 +03:00
parent af72faa906
commit c98cbe6e00
86 changed files with 523 additions and 352 deletions

View file

@ -30,8 +30,8 @@
#define DHCP_MESSAGE_HTYPE (1)
#define DHCP_MESSAGE_HLEN (6)
#define DHCP_SERVER_PORT (67)
#define DHCP_CLIENT_PORT (68)
//#define DHCP_SERVER_PORT (67) // in dhcp.h
//#define DHCP_CLIENT_PORT (68) // in dhcp.h
#define DHCP_MESSAGE_TYPE_DISCOVER (1)
#define DHCP_MESSAGE_TYPE_OFFER (2)

View file

@ -91,9 +91,11 @@ 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

View file

@ -128,7 +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);

View file

@ -217,10 +217,12 @@ u8_t ip4_addr_netmask_valid(u32_t netmask);
ipaddr != NULL ? ip4_addr4_16(ipaddr) : 0))
/* Get one byte from the 4-byte address */
#ifndef ip4_addr1
#define ip4_addr1(ipaddr) (((u8_t*)(ipaddr))[0])
#define ip4_addr2(ipaddr) (((u8_t*)(ipaddr))[1])
#define ip4_addr3(ipaddr) (((u8_t*)(ipaddr))[2])
#define ip4_addr4(ipaddr) (((u8_t*)(ipaddr))[3])
#endif
/* These are cast to u16_t, with the intent that they are often arguments
* to printf using the U16_F format from cc.h. */
#define ip4_addr1_16(ipaddr) ((u16_t)ip4_addr1(ipaddr))

View file

@ -163,9 +163,9 @@ PACK_STRUCT_END
# include "arch/epstruct.h"
#endif
//#define toupper(CH) \
// (((CH) >= 'a' && (CH) <= 'z') ? ((CH) - 'a' + 'A') : (CH))
//#define toupper(CH) (((CH) >= 'a' && (CH) <= 'z') ? ((CH) - 'a' + 'A') : (CH))
extern int toupper(int ch);
/** NetBIOS decoding name */
static int8_t NETBIOS_CODE_ATTR NBNS_decode(char *dst, char *src)
@ -226,7 +226,7 @@ netbios_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, ip_addr_t *addr,
if (current_netif != NULL && current_netif->num < NET_IF_NUM) {
uint32 ip = current_netif->ip_addr.addr;
char *curbiosname = netbios_name[current_netif->num];
if (curbiosname[0] != '\0' && ip != NULL
if (curbiosname[0] != '\0' && ip != 0
/* we only answer if we got a default interface */
&& (((ip ^ addr->addr) & current_netif->netmask.addr) == 0)) { // запрет ответа другой подсети
#if DEBUGSOO > 3

View file

@ -159,7 +159,7 @@ void sntp_get_lasttime(long *sec, long *usec, unsigned int *tick)
time_t sntp_gen_system_time(int timezone)
{
struct tm current_tm;
// struct tm current_tm;
unsigned int update_tick;
long update_sec, update_usec, current_sec = 0;