Merge pull request #2 from odiumuniverse/fix-unused-args

Fix unused args
This commit is contained in:
Azamat Ishbaev 2024-08-01 20:52:25 +03:00 committed by GitHub
commit c64a4dbb80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View File

@ -7,6 +7,7 @@ with newer versions.
(git master)
* [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
* 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.

View File

@ -16,8 +16,8 @@
/*#define PACKET_LIB_QUIET*/
/* If these 2 are not defined, the corresponding config setting is used */
/* #define USE_DHCP 0 */
/* #define USE_AUTOIP 0 */
#define USE_DHCP 0
#define USE_AUTOIP 0
/* #define USE_PCAPIF 1 */
#define LWIP_PORT_INIT_IPADDR(addr) IP4_ADDR((addr), 192,168,1,200)

View File

@ -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",
s, (*(int*)optval)));
LWIP_UNUSED_ARG(s);
}
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 */
if (sock->conn->pcb.raw->protocol == IPPROTO_ICMPV6) {
done_socket(sock);
LWIP_UNUSED_ARG(s);
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) {
/* Per RFC3542, odd offsets are not allowed */
done_socket(sock);
LWIP_UNUSED_ARG(s);
return EINVAL;
}
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",
s, sock->conn->pcb.raw->chksum_reqd));
LWIP_UNUSED_ARG(s);
return 0;
}
#endif