mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-11 15:22:13 +03:00
Remove warnings, errors during host tests in CI (#8358)
* Remove warnings, errors during host tests in CI Debug strings often included format parameters which did not exactly match the passed in format parameters, resulting in warnings in the host test build process like ```` /home/runner/work/Arduino/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp:107:20: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=] 107 | DEBUG_WIFI("[AP] SSID length %u, too long or missing!\n", ssid_len); | ~~~~~~~~ | | | size_t {aka long unsigned int} ```` Fix by applying casting or PRxxx macros as appropriate. Also, fix one debug message which was trying to use a `String` as a `char *`: ```` /home/runner/work/Arduino/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp: In member function ‘wl_status_t ESP8266WiFiMulti::connectWiFiMulti(uint32_t)’: /home/runner/work/Arduino/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp:331:34: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘String’ [-Wformat=] 331 | DEBUG_WIFI_MULTI("[WIFIM] Connecting %s\n", ssid); ```` * Clean up SpeedTest.ino host build
This commit is contained in:
committed by
GitHub
parent
3f5a76cc26
commit
7d971fa45b
@ -768,7 +768,7 @@ bool MDNSResponder::_printRRAnswer(const MDNSResponder::stcMDNS_RRAnswer& p_RRAn
|
||||
if (pTxts)
|
||||
{
|
||||
((/*const c_str()!!*/stcMDNS_RRAnswerTXT*)&p_RRAnswer)->m_Txts.c_str(pTxts);
|
||||
DEBUG_OUTPUT.printf_P(PSTR("TXT(%u) %s"), stTxtLength, pTxts);
|
||||
DEBUG_OUTPUT.printf_P(PSTR("TXT(%zu) %s"), stTxtLength, pTxts);
|
||||
delete[] pTxts;
|
||||
}
|
||||
break;
|
||||
|
@ -1666,19 +1666,19 @@ bool MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcTTL::finalTimeoutLevel(vo
|
||||
unsigned long MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcTTL::timeout(void) const
|
||||
{
|
||||
|
||||
uint32_t u32Timeout = esp8266::polledTimeout::oneShotMs::neverExpires;
|
||||
unsigned long timeout = esp8266::polledTimeout::oneShotMs::neverExpires;
|
||||
|
||||
if (TIMEOUTLEVEL_BASE == m_timeoutLevel) // 80%
|
||||
{
|
||||
u32Timeout = (m_u32TTL * 800); // to milliseconds
|
||||
timeout = (m_u32TTL * 800L); // to milliseconds
|
||||
}
|
||||
else if ((TIMEOUTLEVEL_BASE < m_timeoutLevel) && // >80% AND
|
||||
(TIMEOUTLEVEL_FINAL >= m_timeoutLevel)) // <= 100%
|
||||
{
|
||||
|
||||
u32Timeout = (m_u32TTL * 50);
|
||||
timeout = (m_u32TTL * 50L);
|
||||
} // else: invalid
|
||||
return u32Timeout;
|
||||
return timeout;
|
||||
}
|
||||
|
||||
|
||||
|
@ -532,7 +532,7 @@ bool MDNSResponder::_readRRAnswer(MDNSResponder::stcMDNS_RRAnswer*& p_rpRRAnswer
|
||||
if (pTxts)
|
||||
{
|
||||
((stcMDNS_RRAnswerTXT*&)p_rpRRAnswer)->m_Txts.c_str(pTxts);
|
||||
DEBUG_OUTPUT.printf_P(PSTR("TXT(%u) %s"), stTxtLength, pTxts);
|
||||
DEBUG_OUTPUT.printf_P(PSTR("TXT(%zu) %s"), stTxtLength, pTxts);
|
||||
delete[] pTxts;
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user