mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-06-11 09:29:40 +00:00
Minor changes in contrib folder: fix some warnings
This commit is contained in:
parent
52c5f3bf38
commit
0ed511d380
|
@ -52,6 +52,8 @@ conn_err(void *arg, err_t err)
|
|||
{
|
||||
struct http_state *hs;
|
||||
|
||||
LWIP_UNUSED_ARG(err);
|
||||
|
||||
hs = arg;
|
||||
mem_free(hs);
|
||||
}
|
||||
|
@ -124,6 +126,8 @@ http_sent(void *arg, struct tcp_pcb *pcb, u16_t len)
|
|||
{
|
||||
struct http_state *hs;
|
||||
|
||||
LWIP_UNUSED_ARG(len);
|
||||
|
||||
hs = arg;
|
||||
|
||||
hs->retries = 0;
|
||||
|
@ -201,6 +205,9 @@ http_accept(void *arg, struct tcp_pcb *pcb, err_t err)
|
|||
{
|
||||
struct http_state *hs;
|
||||
|
||||
LWIP_UNUSED_ARG(arg);
|
||||
LWIP_UNUSED_ARG(err);
|
||||
|
||||
tcp_setprio(pcb, TCP_PRIO_MIN);
|
||||
|
||||
/* Allocate memory for the structure that holds the state of the
|
||||
|
|
|
@ -142,7 +142,9 @@ netbios_name_decoding( char *name_enc, char *name_dec, int name_dec_len)
|
|||
char cname;
|
||||
char cnbname;
|
||||
int index = 0;
|
||||
|
||||
|
||||
LWIP_UNUSED_ARG(name_dec_len);
|
||||
|
||||
/* Start decoding netbios name. */
|
||||
pname = name_enc;
|
||||
for (;;) {
|
||||
|
@ -238,6 +240,8 @@ netbios_name_encoding(char *name_enc, char *name_dec, int name_dec_len)
|
|||
static void
|
||||
netbios_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port)
|
||||
{
|
||||
LWIP_UNUSED_ARG(arg);
|
||||
|
||||
/* if packet is valid */
|
||||
if (p != NULL) {
|
||||
char netbios_name[NETBIOS_NAME_LEN+1];
|
||||
|
@ -252,7 +256,7 @@ netbios_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *ad
|
|||
((ntohs(netbios_hdr->flags) & NETB_HFLAG_RESPONSE) == 0) &&
|
||||
(ntohs(netbios_hdr->questions) == 1)) {
|
||||
/* decode the NetBIOS name */
|
||||
netbios_name_decoding( netbios_name_hdr->encname, netbios_name, sizeof(netbios_name));
|
||||
netbios_name_decoding( (char*)(netbios_name_hdr->encname), netbios_name, sizeof(netbios_name));
|
||||
/* if the packet is for us */
|
||||
if (strcmp( netbios_name, NETBIOS_LWIP_NAME)==0) {
|
||||
struct pbuf *q;
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
#if LWIP_TCP
|
||||
static err_t netio_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
|
||||
{
|
||||
|
||||
LWIP_UNUSED_ARG(arg);
|
||||
|
||||
if (err == ERR_OK && p != NULL) {
|
||||
tcp_recved(pcb, p->tot_len);
|
||||
pbuf_free(p);
|
||||
|
@ -25,6 +28,9 @@ static err_t netio_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t er
|
|||
|
||||
static err_t netio_accept(void *arg, struct tcp_pcb *pcb, err_t err)
|
||||
{
|
||||
LWIP_UNUSED_ARG(arg);
|
||||
LWIP_UNUSED_ARG(err);
|
||||
|
||||
tcp_arg(pcb, NULL);
|
||||
tcp_sent(pcb, NULL);
|
||||
tcp_recv(pcb, netio_recv);
|
||||
|
|
|
@ -150,7 +150,7 @@ ping_recv(int s)
|
|||
struct sockaddr_in from;
|
||||
struct icmp_echo_hdr *iecho;
|
||||
|
||||
while((len = lwip_recvfrom(s, buf, sizeof(buf), 0, (struct sockaddr*)&from, &fromlen)) > 0) {
|
||||
while((len = lwip_recvfrom(s, buf, sizeof(buf), 0, (struct sockaddr*)&from, (socklen_t*)&fromlen)) > 0) {
|
||||
if (len >= sizeof(struct icmp_echo_hdr)) {
|
||||
LWIP_DEBUGF( PING_DEBUG, ("ping: recv "));
|
||||
ip_addr_debug_print(PING_DEBUG, (struct ip_addr *)&(from.sin_addr));
|
||||
|
@ -176,6 +176,8 @@ ping_thread(void *arg)
|
|||
int timeout = PING_RCV_TIMEO;
|
||||
struct ip_addr ping_target;
|
||||
|
||||
LWIP_UNUSED_ARG(arg);
|
||||
|
||||
if ((s = lwip_socket(AF_INET, SOCK_RAW, IP_PROTO_ICMP)) < 0) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -192,6 +192,7 @@ sntp_request()
|
|||
static void
|
||||
sntp_thread(void *arg)
|
||||
{
|
||||
LWIP_UNUSED_ARG(arg);
|
||||
while(1) {
|
||||
sntp_request();
|
||||
sys_msleep(SNTP_UPDATE_DELAY);
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
/** @todo fix some warnings */
|
||||
#pragma warning (disable: 4127)
|
||||
#pragma warning (disable: 4244)
|
||||
#pragma warning (disable: 4706)
|
||||
#pragma warning (disable: 4996)
|
||||
|
||||
#define LWIP_PROVIDE_ERRNO
|
||||
|
|
Loading…
Reference in New Issue
Block a user