1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-09-03 20:43:15 +03:00

Fix warnings (#2881)

* Suppressed -Wunused-parameter and -Wunused-function by casting to void unused identifiers.

* Explicit initialization of all fields to suppress -Wmissing-field-initializers.

* Fixed signed/unsigned integer comparison.

* memset initialization of structs.

* More -Wunused-parameter fixes.
This commit is contained in:
Rodion Kvashnin
2017-01-31 13:07:59 +06:00
committed by Ivan Grokhotkov
parent d85e783806
commit 2126146e20
27 changed files with 92 additions and 12 deletions

View File

@@ -372,6 +372,8 @@ protected:
err_t _sent(tcp_pcb* pcb, uint16_t len)
{
(void) pcb;
(void) len;
DEBUGV(":sent %d\r\n", len);
_write_some_from_cb();
return ERR_OK;
@@ -405,6 +407,8 @@ protected:
recv_ret_t _recv(tcp_pcb* pcb, pbuf* pb, err_t err)
{
(void) pcb;
(void) err;
if(pb == 0) { // connection closed
DEBUGV(":rcl\r\n");
_cancel_write();
@@ -425,6 +429,7 @@ protected:
void _error(err_t err)
{
(void) err;
DEBUGV(":er %d %08x\r\n", err, (uint32_t) _datasource);
tcp_arg(_pcb, NULL);
tcp_sent(_pcb, NULL);

View File

@@ -75,6 +75,7 @@ public:
void release_buffer(const uint8_t* buffer, size_t size) override
{
(void) buffer;
_pos += size;
}

View File

@@ -330,6 +330,9 @@ private:
void _recv(udp_pcb *upcb, pbuf *pb,
ip_addr_t *addr, u16_t port)
{
(void) upcb;
(void) addr;
(void) port;
if (_rx_buf)
{
// there is some unread data