update static check options and fix lows
This commit is contained in:
parent
1eddcd1f5c
commit
4f9c91c108
@ -14,7 +14,7 @@ protected:
|
||||
ProtocolNo no;
|
||||
|
||||
public:
|
||||
Protocol(ProtocolNo protocol) : no(protocol) {}
|
||||
explicit Protocol(ProtocolNo protocol) : no(protocol) {}
|
||||
|
||||
Protocol& setProtocol(unsigned int p) {
|
||||
no = static_cast<ProtocolNo>(p);
|
||||
|
||||
@ -16,7 +16,7 @@ struct RcDecoder {
|
||||
}
|
||||
|
||||
state = RC_STATE(res);
|
||||
sprintf(group, "%05ld", RC_GROUP(res));
|
||||
sprintf(group, "%05lu", RC_GROUP(res));
|
||||
switch (RC_DEVICE(res)) {
|
||||
case 0b10000:
|
||||
device = 1;
|
||||
|
||||
@ -75,11 +75,11 @@ namespace Board {
|
||||
|
||||
void parseSwitches(JsonDocument& jsonDoc) {
|
||||
JsonObjectConst rcSwitch = jsonDoc["rcSwitch"];
|
||||
switch ((unsigned int)rcSwitch["protocol"]) {
|
||||
switch (static_cast<unsigned int>(rcSwitch["protocol"])) {
|
||||
case 1: {
|
||||
string id = Protocol_1::buildId((const char*)rcSwitch["group"], (int)rcSwitch["channel"]);
|
||||
string id = Protocol_1::buildId(static_cast<const char*>(rcSwitch["group"]), static_cast<int>(rcSwitch["channel"]));
|
||||
Ha::Switch* el = p1Switches[id];
|
||||
if (el) el->updateState((bool)rcSwitch["state"]);
|
||||
if (el) el->updateState(static_cast<bool>(rcSwitch["state"]));
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
|
||||
@ -33,7 +33,7 @@ class SensorId {
|
||||
char strValue[4];
|
||||
|
||||
public:
|
||||
SensorId(uint8_t id) {
|
||||
explicit SensorId(uint8_t id) {
|
||||
value = id;
|
||||
snprintf(strValue, 4, "%d", value);
|
||||
}
|
||||
|
||||
@ -21,9 +21,8 @@ lib_deps =
|
||||
https://git.hodos.ro/libraries/serial-reader.git@^1.0.0
|
||||
build_flags = -D DEBUG_RAW=0
|
||||
check_tool = cppcheck
|
||||
check_flags = --enable=all
|
||||
check_flags = --enable=all cppcheck: --suppress=*:*/.pio/*
|
||||
check_skip_packages = yes
|
||||
check_severity = medium, high
|
||||
|
||||
[env:huzzah]
|
||||
platform = espressif8266
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user