diff --git a/tasmota/support.ino b/tasmota/support.ino index a791563ee..f2d2c75f5 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -391,7 +391,7 @@ char* NoAlNumToUnderscore(char* dest, const char* source) return dest; } -char IndexSeparator() +char IndexSeparator(void) { /* // 20 bytes more costly !?! @@ -414,7 +414,7 @@ void SetShortcutDefault(void) } } -uint8_t Shortcut() +uint8_t Shortcut(void) { uint8_t result = 10; @@ -921,7 +921,7 @@ int ResponseJsonEndEnd(void) * GPIO Module and Template management \*********************************************************************************************/ -uint8_t ModuleNr() +uint8_t ModuleNr(void) { // 0 = User module (255) // 1 up = Template module 0 up @@ -953,7 +953,7 @@ String AnyModuleName(uint32_t index) } } -String ModuleName() +String ModuleName(void) { return AnyModuleName(Settings.module); } @@ -985,7 +985,7 @@ void ModuleGpios(myio *gp) // AddLogBuffer(LOG_LEVEL_DEBUG, (uint8_t *)gp, sizeof(myio)); } -gpio_flag ModuleFlag() +gpio_flag ModuleFlag(void) { gpio_flag flag; @@ -1005,7 +1005,7 @@ void ModuleDefault(uint32_t module) memcpy_P(&Settings.user_template, &kModules[module], sizeof(mytmplt)); } -void SetModuleType() +void SetModuleType(void) { my_module_type = (USER_MODULE == Settings.module) ? Settings.user_template_base : Settings.module; } @@ -1033,7 +1033,7 @@ bool ValidGPIO(uint32_t pin, uint32_t gpio) return (GPIO_USER == ValidPin(pin, gpio)); // Only allow GPIO_USER pins } -bool ValidAdc() +bool ValidAdc(void) { gpio_flag flag = ModuleFlag(); uint32_t template_adc0 = flag.data &15; @@ -1133,7 +1133,7 @@ bool JsonTemplate(const char* dataBuf) return true; } -void TemplateJson() +void TemplateJson(void) { Response_P(PSTR("{\"" D_JSON_NAME "\":\"%s\",\"" D_JSON_GPIO "\":["), Settings.user_template.name); for (uint32_t i = 0; i < sizeof(Settings.user_template.gp); i++) { diff --git a/tasmota/support_wifi.ino b/tasmota/support_wifi.ino index f90d7cff1..c920c8a63 100644 --- a/tasmota/support_wifi.ino +++ b/tasmota/support_wifi.ino @@ -217,7 +217,7 @@ void WifiBegin(uint8_t flag, uint8_t channel) #endif // LWIP_IPV6=1 } -void WifiBeginAfterScan() +void WifiBeginAfterScan(void) { static int8_t best_network_db; @@ -314,12 +314,12 @@ void WifiBeginAfterScan() } } -uint16_t WifiLinkCount() +uint16_t WifiLinkCount(void) { return Wifi.link_count; } -String WifiDowntime() +String WifiDowntime(void) { return GetDuration(Wifi.downtime); } diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index 1469caa2c..64a1125c6 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -1661,7 +1661,7 @@ void setup(void) XsnsCall(FUNC_INIT); } -static void BacklogLoop() +void BacklogLoop(void) { if (TimeReached(backlog_delay)) { if (!BACKLOG_EMPTY && !backlog_mutex) { diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index 64194c9c9..26d618326 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -730,7 +730,7 @@ void _WSContentSend(const String& content) // Low level sendContent for a DEBUG_CORE_LOG(PSTR("WEB: Chunk size %d"), len); } -void WSContentFlush() +void WSContentFlush(void) { if (Web.chunk_buffer.length() > 0) { _WSContentSend(Web.chunk_buffer); // Flush chunk buffer diff --git a/tasmota/xdrv_02_mqtt.ino b/tasmota/xdrv_02_mqtt.ino index c8250afbb..bf4d82a49 100644 --- a/tasmota/xdrv_02_mqtt.ino +++ b/tasmota/xdrv_02_mqtt.ino @@ -468,7 +468,7 @@ void MqttPublishPowerState(uint32_t device) #endif // USE_SONOFF_IFAN } -void MqttPublishAllPowerState() +void MqttPublishAllPowerState(void) { for (uint32_t i = 1; i <= devices_present; i++) { MqttPublishPowerState(i); @@ -493,7 +493,7 @@ void MqttPublishPowerBlinkState(uint32_t device) /*********************************************************************************************/ -uint16_t MqttConnectCount() +uint16_t MqttConnectCount(void) { return Mqtt.connect_count; } diff --git a/tasmota/xdrv_03_energy.ino b/tasmota/xdrv_03_energy.ino index 743fc82fc..6d8be5c2b 100644 --- a/tasmota/xdrv_03_energy.ino +++ b/tasmota/xdrv_03_energy.ino @@ -430,7 +430,7 @@ void EnergyMqttShow(void) } #endif // USE_ENERGY_MARGIN_DETECTION -void EnergyEverySecond() +void EnergyEverySecond(void) { // Overtemp check if (global_update) { diff --git a/tasmota/xdrv_05_irremote.ino b/tasmota/xdrv_05_irremote.ino index 7ac3d0ca8..6b482f485 100644 --- a/tasmota/xdrv_05_irremote.ino +++ b/tasmota/xdrv_05_irremote.ino @@ -66,7 +66,7 @@ IRrecv *irrecv = nullptr; unsigned long ir_lasttime = 0; -void IrReceiveUpdateThreshold() +void IrReceiveUpdateThreshold(void) { if (irrecv != nullptr) { if (Settings.param[P_IR_UNKNOW_THRESHOLD] < 6) { Settings.param[P_IR_UNKNOW_THRESHOLD] = 6; } diff --git a/tasmota/xdrv_05_irremote_full.ino b/tasmota/xdrv_05_irremote_full.ino index 5cb6d1d00..7625d057a 100644 --- a/tasmota/xdrv_05_irremote_full.ino +++ b/tasmota/xdrv_05_irremote_full.ino @@ -92,7 +92,7 @@ IRrecv *irrecv = nullptr; unsigned long ir_lasttime = 0; -void IrReceiveUpdateThreshold() +void IrReceiveUpdateThreshold(void) { if (irrecv != nullptr) { if (Settings.param[P_IR_UNKNOW_THRESHOLD] < 6) { Settings.param[P_IR_UNKNOW_THRESHOLD] = 6; } diff --git a/tasmota/xdrv_07_domoticz.ino b/tasmota/xdrv_07_domoticz.ino index 64f222e6e..f5e8af19c 100644 --- a/tasmota/xdrv_07_domoticz.ino +++ b/tasmota/xdrv_07_domoticz.ino @@ -80,7 +80,7 @@ int DomoticzRssiQuality(void) } #ifdef USE_SONOFF_IFAN -void MqttPublishDomoticzFanState() +void MqttPublishDomoticzFanState(void) { if (Settings.flag.mqtt_enabled && Settings.domoticz_relay_idx[1]) { // SetOption3 - Enable MQTT char svalue[8]; // Fanspeed value @@ -94,7 +94,7 @@ void MqttPublishDomoticzFanState() } } -void DomoticzUpdateFanState() +void DomoticzUpdateFanState(void) { if (domoticz_update_flag) { MqttPublishDomoticzFanState(); diff --git a/tasmota/xdrv_10_rules.ino b/tasmota/xdrv_10_rules.ino index 64ae42f1c..4025ef5d4 100644 --- a/tasmota/xdrv_10_rules.ino +++ b/tasmota/xdrv_10_rules.ino @@ -1226,7 +1226,7 @@ float evaluateExpression(const char * expression, unsigned int len) #endif // USE_EXPRESSION #ifdef SUPPORT_IF_STATEMENT -void CmndIf() +void CmndIf(void) { if (XdrvMailbox.data_len > 0) { char parameters[XdrvMailbox.data_len+1]; diff --git a/tasmota/xdrv_22_sonoff_ifan.ino b/tasmota/xdrv_22_sonoff_ifan.ino index 2c1031e23..4fd2bd2b6 100644 --- a/tasmota/xdrv_22_sonoff_ifan.ino +++ b/tasmota/xdrv_22_sonoff_ifan.ino @@ -43,7 +43,7 @@ bool ifan_restart_flag = true; /*********************************************************************************************/ -bool IsModuleIfan() +bool IsModuleIfan(void) { return ((SONOFF_IFAN02 == my_module_type) || (SONOFF_IFAN03 == my_module_type)); } diff --git a/tasmota/xdrv_28_pcf8574.ino b/tasmota/xdrv_28_pcf8574.ino index 9448f6e6d..212217a49 100644 --- a/tasmota/xdrv_28_pcf8574.ino +++ b/tasmota/xdrv_28_pcf8574.ino @@ -72,7 +72,7 @@ void Pcf8574SwitchRelay(void) } } -void Pcf8574Init() +void Pcf8574Init(void) { uint8_t pcf8574_address = PCF8574_ADDR1; while ((Pcf8574.max_devices < MAX_PCF8574) && (pcf8574_address < PCF8574_ADDR2 +8)) { @@ -178,7 +178,7 @@ void HandlePcf8574(void) WSContentStop(); } -void Pcf8574SaveSettings() +void Pcf8574SaveSettings(void) { char stemp[7]; char tmp[100]; diff --git a/tasmota/xdsp_02_ssd1306.ino b/tasmota/xdsp_02_ssd1306.ino index 0b1fff3d0..e263901bc 100644 --- a/tasmota/xdsp_02_ssd1306.ino +++ b/tasmota/xdsp_02_ssd1306.ino @@ -47,7 +47,7 @@ extern uint8_t *buffer; /*********************************************************************************************/ -void SSD1306InitDriver() +void SSD1306InitDriver(void) { if (!Settings.display_model) { if (I2cSetDevice(OLED_ADDRESS1)) { diff --git a/tasmota/xnrg_07_ade7953.ino b/tasmota/xnrg_07_ade7953.ino index 60174d0b6..8643af065 100644 --- a/tasmota/xnrg_07_ade7953.ino +++ b/tasmota/xnrg_07_ade7953.ino @@ -185,7 +185,7 @@ void Ade7953GetData(void) } } -void Ade7953EnergyEverySecond() +void Ade7953EnergyEverySecond(void) { if (Ade7953.init_step) { if (1 == Ade7953.init_step) { diff --git a/tasmota/xnrg_12_solaxX1.ino b/tasmota/xnrg_12_solaxX1.ino index b520302d3..910ca5822 100644 --- a/tasmota/xnrg_12_solaxX1.ino +++ b/tasmota/xnrg_12_solaxX1.ino @@ -201,7 +201,7 @@ uint16_t solaxX1_calculateCRC(uint8_t *bExternTxPackage, uint8_t bLen) return wChkSum; } -void solaxX1_SendInverterAddress() +void solaxX1_SendInverterAddress(void) { source[0] = 0x00; destination[0] = 0x00; @@ -213,7 +213,7 @@ void solaxX1_SendInverterAddress() solaxX1_RS485Send(24); } -void solaxX1_QueryLiveData() +void solaxX1_QueryLiveData(void) { source[0] = 0x01; destination[0] = 0x00; diff --git a/tasmota/xsns_02_analog.ino b/tasmota/xsns_02_analog.ino index b65c23ab5..ddefb6729 100644 --- a/tasmota/xsns_02_analog.ino +++ b/tasmota/xsns_02_analog.ino @@ -101,7 +101,7 @@ void AdcEvery250ms(void) } #endif // USE_RULES -uint16_t AdcGetLux() +uint16_t AdcGetLux(void) { int adc = AdcRead(2); // Source: https://www.allaboutcircuits.com/projects/design-a-luxmeter-using-a-light-dependent-resistor/ diff --git a/tasmota/xsns_34_hx711.ino b/tasmota/xsns_34_hx711.ino index 6065ad719..d9076f61d 100644 --- a/tasmota/xsns_34_hx711.ino +++ b/tasmota/xsns_34_hx711.ino @@ -90,7 +90,7 @@ bool HxIsReady(uint16_t timeout) return (digitalRead(Hx.pin_dout) == LOW); } -long HxRead() +long HxRead(void) { if (!HxIsReady(HX_TIMEOUT)) { return -1; } @@ -241,7 +241,7 @@ bool HxCommand(void) /*********************************************************************************************/ -long HxWeight() +long HxWeight(void) { return (Hx.calibrate_step < HX_CAL_FAIL) ? Hx.weight : 0; } @@ -371,7 +371,7 @@ void HxEvery100mSecond(void) } } -void HxSaveBeforeRestart() +void HxSaveBeforeRestart(void) { Settings.energy_frequency_calibration = Hx.weight; Hx.sample_count = HX_SAMPLES +1; // Stop updating Hx.weight