mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-25 09:02:38 +00:00
Merge pull request #2 from odiumuniverse/fix-unused-args
Fix unused args
This commit is contained in:
commit
c64a4dbb80
@ -7,6 +7,7 @@ with newer versions.
|
|||||||
(git master)
|
(git master)
|
||||||
|
|
||||||
* [Enter new changes just after this line - do not remove this line]
|
* [Enter new changes just after this line - do not remove this line]
|
||||||
|
* Fixed bug with unused arguments in sockets.c
|
||||||
* Fixed bug with dangling pointer in snmp_traps.c
|
* Fixed bug with dangling pointer in snmp_traps.c
|
||||||
* The eth_addr_cmp and ip_addr_cmp set of functions have been renamed to eth_addr_eq, ip_addr_eq
|
* The eth_addr_cmp and ip_addr_cmp set of functions have been renamed to eth_addr_eq, ip_addr_eq
|
||||||
and so on, since they return non-zero on equality. Macros for the old names exist.
|
and so on, since they return non-zero on equality. Macros for the old names exist.
|
||||||
|
@ -10,14 +10,14 @@
|
|||||||
/** Define this to the index of the windows network adapter to use */
|
/** Define this to the index of the windows network adapter to use */
|
||||||
#define PACKET_LIB_ADAPTER_NR 1
|
#define PACKET_LIB_ADAPTER_NR 1
|
||||||
/** Define this to the GUID of the windows network adapter to use
|
/** Define this to the GUID of the windows network adapter to use
|
||||||
* or NOT define this if you want PACKET_LIB_ADAPTER_NR to be used */
|
* or NOT define this if you want PACKET_LIB_ADAPTER_NR to be used */
|
||||||
/*#define PACKET_LIB_ADAPTER_GUID "00000000-0000-0000-0000-000000000000"*/
|
/*#define PACKET_LIB_ADAPTER_GUID "00000000-0000-0000-0000-000000000000"*/
|
||||||
/*#define PACKET_LIB_GET_ADAPTER_NETADDRESS(addr) IP4_ADDR((addr), 192,168,1,0)*/
|
/*#define PACKET_LIB_GET_ADAPTER_NETADDRESS(addr) IP4_ADDR((addr), 192,168,1,0)*/
|
||||||
/*#define PACKET_LIB_QUIET*/
|
/*#define PACKET_LIB_QUIET*/
|
||||||
|
|
||||||
/* If these 2 are not defined, the corresponding config setting is used */
|
/* If these 2 are not defined, the corresponding config setting is used */
|
||||||
/* #define USE_DHCP 0 */
|
#define USE_DHCP 0
|
||||||
/* #define USE_AUTOIP 0 */
|
#define USE_AUTOIP 0
|
||||||
|
|
||||||
/* #define USE_PCAPIF 1 */
|
/* #define USE_PCAPIF 1 */
|
||||||
#define LWIP_PORT_INIT_IPADDR(addr) IP4_ADDR((addr), 192,168,1,200)
|
#define LWIP_PORT_INIT_IPADDR(addr) IP4_ADDR((addr), 192,168,1,200)
|
||||||
|
@ -2934,6 +2934,7 @@ lwip_getsockopt_impl_ipv6_checksum(int s, struct lwip_sock* sock, void* optval)
|
|||||||
}
|
}
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM) = %d\n",
|
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM) = %d\n",
|
||||||
s, (*(int*)optval)));
|
s, (*(int*)optval)));
|
||||||
|
LWIP_UNUSED_ARG(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -2943,6 +2944,7 @@ lwip_setsockopt_impl_ipv6_checksum(int s, struct lwip_sock* sock, const void* op
|
|||||||
* as per RFC 3542 chapter 3.1 */
|
* as per RFC 3542 chapter 3.1 */
|
||||||
if (sock->conn->pcb.raw->protocol == IPPROTO_ICMPV6) {
|
if (sock->conn->pcb.raw->protocol == IPPROTO_ICMPV6) {
|
||||||
done_socket(sock);
|
done_socket(sock);
|
||||||
|
LWIP_UNUSED_ARG(s);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2953,6 +2955,7 @@ lwip_setsockopt_impl_ipv6_checksum(int s, struct lwip_sock* sock, const void* op
|
|||||||
else if (*(const int*)optval & 1) {
|
else if (*(const int*)optval & 1) {
|
||||||
/* Per RFC3542, odd offsets are not allowed */
|
/* Per RFC3542, odd offsets are not allowed */
|
||||||
done_socket(sock);
|
done_socket(sock);
|
||||||
|
LWIP_UNUSED_ARG(s);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -2961,6 +2964,7 @@ lwip_setsockopt_impl_ipv6_checksum(int s, struct lwip_sock* sock, const void* op
|
|||||||
}
|
}
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM, ..) -> %d\n",
|
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM, ..) -> %d\n",
|
||||||
s, sock->conn->pcb.raw->chksum_reqd));
|
s, sock->conn->pcb.raw->chksum_reqd));
|
||||||
|
LWIP_UNUSED_ARG(s);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user