Comparison of unsigned expression < 0 is always false

This commit is contained in:
Micke Prag 2012-10-30 15:58:01 +01:00
parent bc777e04ca
commit 4d1fdd777f
5 changed files with 6 additions and 5 deletions

View file

@ -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 "";
}

View file

@ -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 "";
}

View file

@ -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 "";

View file

@ -76,7 +76,7 @@ std::string ProtocolSartano::decodeData(const ControllerMessage &dataMsg) {
return "";
}
if(code < 0 || code > 1023) {
if(code > 1023) {
// not sartano
return "";
}

View file

@ -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 "";
}