[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:
@@ -107,7 +107,7 @@ static InfraredStatus infrared_common_decode_bits(InfraredCommonDecoder* decoder
|
||||
decoder->timings_cnt = consume_samples(decoder->timings, decoder->timings_cnt, 1);
|
||||
|
||||
/* check if largest protocol version can be decoded */
|
||||
if(level && (decoder->protocol->databit_len[0] == decoder->databit_cnt) &&
|
||||
if(level && (decoder->protocol->databit_len[0] == decoder->databit_cnt) && //-V1051
|
||||
!timings->min_split_time) {
|
||||
status = InfraredStatusReady;
|
||||
break;
|
||||
|
@@ -94,7 +94,6 @@ InfraredStatus
|
||||
case InfraredCommonEncoderStateSilence:
|
||||
*duration = encoder->protocol->timings.silence_time;
|
||||
*level = false;
|
||||
status = InfraredStatusOk;
|
||||
encoder->state = InfraredCommonEncoderStatePreamble;
|
||||
++encoder->timings_encoded;
|
||||
encoder->timings_sum = 0;
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#include "infrared.h"
|
||||
#include "infrared_i.h"
|
||||
|
||||
#define MATCH_TIMING(x, v, delta) (((x) < (v + delta)) && ((x) > (v - delta)))
|
||||
#define MATCH_TIMING(x, v, delta) (((x) < ((v) + (delta))) && ((x) > ((v) - (delta))))
|
||||
|
||||
typedef struct InfraredCommonDecoder InfraredCommonDecoder;
|
||||
typedef struct InfraredCommonEncoder InfraredCommonEncoder;
|
||||
|
Reference in New Issue
Block a user