Comparison of unsigned expression < 0 is always false
This commit is contained in:
parent
bc777e04ca
commit
4d1fdd777f
5 changed files with 6 additions and 5 deletions
|
@ -111,7 +111,7 @@ std::string ProtocolEverflourish::decodeData(const ControllerMessage &dataMsg) {
|
|||
|
||||
method = allData & 0xF;
|
||||
|
||||
if(house < 0 || house > 16383 || unit < 1 || unit > 4) {
|
||||
if(house > 16383 || unit < 1 || unit > 4) {
|
||||
// not everflourish
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -227,7 +227,7 @@ std::string ProtocolNexa::decodeDataCodeSwitch(uint64_t allData) {
|
|||
|
||||
house = allData & 0xF;
|
||||
|
||||
if(house < 0 || house > 16 || unit < 1 || unit > 16) {
|
||||
if(house > 16 || unit < 1 || unit > 16) {
|
||||
// not arctech codeswitch
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -51,7 +51,8 @@ std::string ProtocolOregon::decodeEA4C(const std::string &data) {
|
|||
value >>= 8;
|
||||
|
||||
checksum += ((value >> 4) & 0xF) + (value & 0xF);
|
||||
uint8_t channel = (value >> 4) & 0x7;
|
||||
// channel not used
|
||||
// uint8_t channel = (value >> 4) & 0x7;
|
||||
|
||||
if (checksum != checksumw) {
|
||||
return "";
|
||||
|
|
|
@ -76,7 +76,7 @@ std::string ProtocolSartano::decodeData(const ControllerMessage &dataMsg) {
|
|||
return "";
|
||||
}
|
||||
|
||||
if(code < 0 || code > 1023) {
|
||||
if(code > 1023) {
|
||||
// not sartano
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ std::string ProtocolWaveman::decodeData(const ControllerMessage& dataMsg) {
|
|||
|
||||
house = allData & 0xF;
|
||||
|
||||
if(house < 0 || house > 16 || unit < 1 || unit > 16) {
|
||||
if(house > 16 || unit < 1 || unit > 16) {
|
||||
// not waveman
|
||||
return "";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue