mirror of https://github.com/arendst/Tasmota.git
Better fix GCC 10.1 warnings
This commit is contained in:
parent
07ca4dde23
commit
214b227942
|
@ -89,44 +89,34 @@ void MdnsUpdate(void) {
|
|||
\*********************************************************************************************/
|
||||
|
||||
char* NetworkHostname(void) {
|
||||
if (global_state.eth_down) {
|
||||
return my_hostname;
|
||||
}
|
||||
#ifdef ESP32
|
||||
#ifdef USE_ETHERNET
|
||||
else {
|
||||
if (!global_state.eth_down) {
|
||||
return EthernetHostname();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return nullptr; // Never reached. Fix GCC10 warning
|
||||
return my_hostname;
|
||||
}
|
||||
|
||||
IPAddress NetworkAddress(void) {
|
||||
IPAddress result;
|
||||
if (global_state.eth_down) {
|
||||
result = WiFi.localIP();
|
||||
}
|
||||
#ifdef ESP32
|
||||
#ifdef USE_ETHERNET
|
||||
else {
|
||||
result = EthernetLocalIP();
|
||||
if (!global_state.eth_down) {
|
||||
return EthernetLocalIP();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return result;
|
||||
return WiFi.localIP();
|
||||
}
|
||||
|
||||
String NetworkMacAddress(void) {
|
||||
if (global_state.eth_down) {
|
||||
return WiFi.macAddress();
|
||||
}
|
||||
#ifdef ESP32
|
||||
#ifdef USE_ETHERNET
|
||||
else {
|
||||
if (!global_state.eth_down) {
|
||||
return EthernetMacAddress();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return String(""); // Never reached. Fix GCC10 warning
|
||||
return WiFi.macAddress();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue