mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +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:
committed by
Ivan Grokhotkov
parent
d85e783806
commit
2126146e20
@ -160,10 +160,12 @@ bool MDNSResponder::begin(const char* hostname){
|
||||
if (_instanceName.equals("") ) _instanceName=hostname;
|
||||
|
||||
_gotIPHandler = WiFi.onStationModeGotIP([this](const WiFiEventStationModeGotIP& event){
|
||||
(void) event;
|
||||
_restart();
|
||||
});
|
||||
|
||||
_disconnectedHandler = WiFi.onStationModeDisconnected([this](const WiFiEventStationModeDisconnected& event) {
|
||||
(void) event;
|
||||
_restart();
|
||||
});
|
||||
|
||||
@ -550,6 +552,9 @@ void MDNSResponder::_parsePacket(){
|
||||
uint32_t answerTtl = _conn_read32(); // Read ttl
|
||||
uint16_t answerRdlength = _conn_read16(); // Read rdlength
|
||||
|
||||
(void) answerClass;
|
||||
(void) answerTtl;
|
||||
|
||||
if(answerRdlength > 255){
|
||||
if(answerType == MDNS_TYPE_TXT && answerRdlength < 1460){
|
||||
while(--answerRdlength) _conn->read();
|
||||
@ -600,6 +605,9 @@ void MDNSResponder::_parsePacket(){
|
||||
uint16_t answerWeight = _conn_read16(); // Read weight
|
||||
answerPort = _conn_read16(); // Read port
|
||||
|
||||
(void) answerPrio;
|
||||
(void) answerWeight;
|
||||
|
||||
// Read hostname
|
||||
tmp8 = _conn_read8();
|
||||
if (tmp8 & 0xC0) { // Compressed pointer (not supported)
|
||||
|
@ -64,6 +64,8 @@ public:
|
||||
bool begin(const char* hostName);
|
||||
//for compatibility
|
||||
bool begin(const char* hostName, IPAddress ip, uint32_t ttl=120){
|
||||
(void) ip;
|
||||
(void) ttl;
|
||||
return begin(hostName);
|
||||
}
|
||||
/* Application should call this whenever AP is configured/disabled */
|
||||
|
Reference in New Issue
Block a user