mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-09-15 02:54:26 +00:00
[PVS Studio] Fix some hints provided by PVS Studio
This commit is contained in:
@@ -167,7 +167,7 @@ boolean Plugin_020(uint8_t function, struct EventStruct *event, String& string)
|
||||
const ESPEasySerialPort port = static_cast<ESPEasySerialPort>(CONFIG_PORT);
|
||||
|
||||
// const ESPEasySerialPort port= ESPEasySerialPort::serial0;
|
||||
if ((rxPin < 0) && (rxPin < 0)) {
|
||||
if ((rxPin < 0) && (txPin < 0)) {
|
||||
ESPeasySerialType::getSerialTypePins(port, rxPin, txPin);
|
||||
CONFIG_PIN1 = rxPin;
|
||||
CONFIG_PIN2 = txPin;
|
||||
|
||||
@@ -1222,7 +1222,7 @@ float readMax31865(struct EventStruct *event)
|
||||
|
||||
// read conversion result and faults from plugin data structure
|
||||
// if pointer exists and conversion has been finished
|
||||
if ((nullptr != P039_data) && (true == P039_data->convReady)) {
|
||||
if (P039_data->convReady) {
|
||||
rawValue = P039_data->conversionResult;
|
||||
registers[MAX31865_FAULT] = P039_data->deviceFaults;
|
||||
}
|
||||
@@ -1270,14 +1270,12 @@ float readMax31865(struct EventStruct *event)
|
||||
|
||||
// start time to follow up on BIAS activation before starting the conversion
|
||||
// and start conversion sequence via TIMER API
|
||||
if(nullptr != P039_data){
|
||||
// save current timer for next calculation
|
||||
P039_data->timer = millis();
|
||||
// save current timer for next calculation
|
||||
P039_data->timer = millis();
|
||||
|
||||
// set next state to MAX31865_BIAS_ON_STATE
|
||||
// set next state to MAX31865_BIAS_ON_STATE
|
||||
|
||||
Scheduler.setPluginTaskTimer(MAX31865_BIAS_WAIT_TIME, event->TaskIndex, MAX31865_BIAS_ON_STATE);
|
||||
}
|
||||
Scheduler.setPluginTaskTimer(MAX31865_BIAS_WAIT_TIME, event->TaskIndex, MAX31865_BIAS_ON_STATE);
|
||||
|
||||
#ifndef BUILD_NO_DEBUG
|
||||
if (loglevelActiveFor(LOG_LEVEL_DEBUG_MORE))
|
||||
|
||||
@@ -194,7 +194,7 @@ bool do_command_case_check(command_case_data & data,
|
||||
if (mustCheckNrArguments) {
|
||||
if (!checkNrArguments(data.cmd, data.line, nrArguments)) {
|
||||
data.status = return_incorrect_nr_arguments();
|
||||
data.retval = false;
|
||||
//data.retval = false;
|
||||
return true; // Command is handled
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#define DATASTRUCTS_SETTINGSSTRUCT_CPP
|
||||
|
||||
template<unsigned int N_TASKS>
|
||||
SettingsStruct_tmpl<N_TASKS>::SettingsStruct_tmpl() : ResetFactoryDefaultPreference(0) {
|
||||
SettingsStruct_tmpl<N_TASKS>::SettingsStruct_tmpl() : ResetFactoryDefaultPreference(0) { //-V730
|
||||
clearAll();
|
||||
clearNetworkSettings();
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ void handle_notifications() {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Settings.Notification != 0)
|
||||
if (Settings.Notification[notificationindex] != 0)
|
||||
{
|
||||
nprotocolIndex_t NotificationProtocolIndex = getNProtocolIndex_from_NotifierIndex(notificationindex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user