mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-27 21:16:50 +03:00
Remove warnings when NDEBUG build option used (#4196)
When building using the new NDEBUG option recently added, the assert() macro is defined to nothing. This leaves a few variables unused in the WiFi stack causing compiler warnings. Add in empty casts to remove these warnings. Does not affect actual assert use when NDEBUG is not defined.
This commit is contained in:
parent
4e115917ae
commit
e38f19e008
@ -545,6 +545,7 @@ protected:
|
||||
err_t _connected(struct tcp_pcb *pcb, err_t err)
|
||||
{
|
||||
(void) err;
|
||||
(void) pcb;
|
||||
assert(pcb == _pcb);
|
||||
assert(_connect_pending);
|
||||
esp_schedule();
|
||||
|
@ -31,12 +31,14 @@ public:
|
||||
|
||||
const uint8_t* get_buffer(size_t size) override
|
||||
{
|
||||
(void) size;
|
||||
assert(_pos + size <= _size);
|
||||
return _data + _pos;
|
||||
}
|
||||
|
||||
void release_buffer(const uint8_t* buffer, size_t size) override
|
||||
{
|
||||
(void) buffer;
|
||||
assert(buffer == _data + _pos);
|
||||
_pos += size;
|
||||
}
|
||||
@ -70,6 +72,7 @@ public:
|
||||
}
|
||||
size_t cb = _stream.readBytes(reinterpret_cast<char*>(_buffer.get()), size);
|
||||
assert(cb == size);
|
||||
(void) cb;
|
||||
return _buffer.get();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user