mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-24 05:48:08 +03:00
Fix pvs warnings from OFW
This commit is contained in:
parent
b3559bf058
commit
0bf0267edd
@ -511,7 +511,7 @@ static uint32_t bad_usb_flags_get(uint32_t flags_mask, uint32_t timeout) {
|
|||||||
furi_check((flags & FuriFlagError) == 0);
|
furi_check((flags & FuriFlagError) == 0);
|
||||||
if(flags == 0) {
|
if(flags == 0) {
|
||||||
flags = furi_thread_flags_wait(flags_mask, FuriFlagWaitAny, timeout);
|
flags = furi_thread_flags_wait(flags_mask, FuriFlagWaitAny, timeout);
|
||||||
furi_check(((flags & FuriFlagError) == 0) || (flags == FuriFlagErrorTimeout));
|
furi_check(((flags & FuriFlagError) == 0) || (flags == (unsigned)FuriFlagErrorTimeout));
|
||||||
} else {
|
} else {
|
||||||
uint32_t state = furi_thread_flags_clear(flags);
|
uint32_t state = furi_thread_flags_clear(flags);
|
||||||
furi_check((state & FuriFlagError) == 0);
|
furi_check((state & FuriFlagError) == 0);
|
||||||
@ -610,7 +610,7 @@ static int32_t bad_usb_worker(void* context) {
|
|||||||
WorkerEvtEnd | WorkerEvtDisconnect | WorkerEvtToggle,
|
WorkerEvtEnd | WorkerEvtDisconnect | WorkerEvtToggle,
|
||||||
FuriFlagWaitAny | FuriFlagNoClear,
|
FuriFlagWaitAny | FuriFlagNoClear,
|
||||||
1500);
|
1500);
|
||||||
if(flags == FuriFlagErrorTimeout) {
|
if(flags == (unsigned)FuriFlagErrorTimeout) {
|
||||||
// If nothing happened - start script execution
|
// If nothing happened - start script execution
|
||||||
worker_state = BadUsbStateRunning;
|
worker_state = BadUsbStateRunning;
|
||||||
} else if(flags & WorkerEvtToggle) {
|
} else if(flags & WorkerEvtToggle) {
|
||||||
|
Loading…
Reference in New Issue
Block a user