[FL-2811] Fix PVS-Studio warnings (#2142)
Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: gornekich <n.gorbadey@gmail.com>
This commit is contained in:
@@ -248,14 +248,14 @@ static LevelDuration protocol_metakom_encoder_yield(ProtocolMetakom* proto) {
|
||||
if(proto->encoder.index == 0) {
|
||||
// sync bit
|
||||
result = level_duration_make(false, METAKOM_PERIOD);
|
||||
} else if(proto->encoder.index >= 1 && proto->encoder.index <= 6) {
|
||||
} else if(proto->encoder.index <= 6) {
|
||||
// start word (0b010)
|
||||
switch(proto->encoder.index) {
|
||||
case 1:
|
||||
result = level_duration_make(true, METAKOM_0_LOW);
|
||||
result = level_duration_make(true, METAKOM_0_LOW); //-V1037
|
||||
break;
|
||||
case 2:
|
||||
result = level_duration_make(false, METAKOM_0_HI);
|
||||
result = level_duration_make(false, METAKOM_0_HI); //-V1037
|
||||
break;
|
||||
case 3:
|
||||
result = level_duration_make(true, METAKOM_1_LOW);
|
||||
@@ -317,4 +317,4 @@ const ProtocolBase protocol_metakom = {
|
||||
.start = (ProtocolEncoderStart)protocol_metakom_encoder_start,
|
||||
.yield = (ProtocolEncoderYield)protocol_metakom_encoder_yield,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user