fix some cppcheck warnings

This commit is contained in:
Mike Kinney
2022-01-24 07:00:14 +00:00
parent 8a79ede285
commit b3210f6c2c
20 changed files with 82 additions and 45 deletions

View File

@@ -35,10 +35,10 @@ class EnvironmentalMeasurementPlugin : private concurrency::OSThread, public Pro
private:
float CelsiusToFarenheit(float c);
bool firstTime = 1;
DHT *dht;
OneWire *oneWire;
DS18B20 *ds18b20;
DHT *dht = NULL;
OneWire *oneWire = NULL;
DS18B20 *ds18b20 = NULL;
Adafruit_BME280 bme;
const MeshPacket *lastMeasurementPacket;
uint32_t sensor_read_error_count = 0;
};
};

View File

@@ -25,7 +25,7 @@ extern RangeTestPlugin *rangeTestPlugin;
*/
class RangeTestPluginRadio : public SinglePortPlugin
{
uint32_t lastRxID;
uint32_t lastRxID = 0;
public:
RangeTestPluginRadio() : SinglePortPlugin("RangeTestPluginRadio", PortNum_TEXT_MESSAGE_APP) {}

View File

@@ -25,7 +25,7 @@ extern SerialPlugin *serialPlugin;
*/
class SerialPluginRadio : public SinglePortPlugin
{
uint32_t lastRxID;
uint32_t lastRxID = 0;
public:
/*

View File

@@ -121,7 +121,7 @@ void StoreForwardPlugin::historySend(uint32_t msAgo, uint32_t to)
uint32_t queueSize = storeForwardPlugin->historyQueueCreate(msAgo, to);
if (queueSize) {
snprintf(this->routerMessage, 80, "** S&F - Sending %d message(s)", queueSize);
snprintf(this->routerMessage, 80, "** S&F - Sending %u message(s)", queueSize);
storeForwardPlugin->sendMessage(to, this->routerMessage);
this->busy = true; // runOnce() will pickup the next steps once busy = true.