Minor fix (warnings on unused args, wrong type, cast u32_t to u16_t...)

This commit is contained in:
fbernon 2007-08-01 13:41:31 +00:00
parent 083134bc12
commit fdc4c25e67
2 changed files with 8 additions and 3 deletions

View File

@ -610,10 +610,12 @@ lwip_socket(int domain, int type, int protocol)
struct netconn *conn;
int i;
LWIP_UNUSED_ARG(domain);
/* create a netconn */
switch (type) {
case SOCK_RAW:
conn = netconn_new_with_proto_and_callback(NETCONN_RAW, protocol, event_callback);
conn = netconn_new_with_proto_and_callback(NETCONN_RAW, (u8_t)protocol, event_callback);
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_RAW, %d) = ",
domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol));
break;
@ -851,6 +853,8 @@ event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len)
int s;
struct lwip_socket *sock;
struct lwip_select_cb *scb;
LWIP_UNUSED_ARG(len);
/* Get socket */
if (conn) {
@ -923,6 +927,7 @@ event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len)
int lwip_shutdown(int s, int how)
{
LWIP_UNUSED_ARG(how);
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_shutdown(%d, how=%d)\n", s, how));
return lwip_close(s); /* XXX temporary hack until proper implementation */
}
@ -993,7 +998,7 @@ int lwip_getsockname(int s, struct sockaddr *name, socklen_t *namelen)
int lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen)
{
int err = ERR_OK;
err_t err = ERR_OK;
struct lwip_socket *sock = get_socket(s);
struct lwip_setgetsockopt_data data;

View File

@ -1120,7 +1120,7 @@ tcp_receive(struct tcp_pcb *pcb)
next = cseg->next;
if (TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
/* We need to trim the incoming segment. */
cseg->len = next->tcphdr->seqno - seqno;
cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
pbuf_realloc(cseg->p, cseg->len);
}
}