[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:
@@ -456,17 +456,15 @@ BleGlueCommandResult ble_glue_fus_get_status() {
|
||||
|
||||
BleGlueCommandResult ble_glue_fus_wait_operation() {
|
||||
furi_check(ble_glue->c2_info.mode == BleGlueC2ModeFUS);
|
||||
bool wip;
|
||||
do {
|
||||
BleGlueCommandResult fus_status = ble_glue_fus_get_status();
|
||||
if(fus_status == BleGlueCommandResultError) {
|
||||
return BleGlueCommandResultError;
|
||||
}
|
||||
wip = fus_status == BleGlueCommandResultOperationOngoing;
|
||||
if(wip) {
|
||||
furi_delay_ms(20);
|
||||
}
|
||||
} while(wip);
|
||||
|
||||
return BleGlueCommandResultOK;
|
||||
while(true) {
|
||||
BleGlueCommandResult fus_status = ble_glue_fus_get_status();
|
||||
if(fus_status == BleGlueCommandResultOperationOngoing) {
|
||||
furi_delay_ms(20);
|
||||
} else if(fus_status == BleGlueCommandResultError) {
|
||||
return BleGlueCommandResultError;
|
||||
} else {
|
||||
return BleGlueCommandResultOK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -227,7 +227,7 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
case EVT_BLUE_GAP_NUMERIC_COMPARISON_VALUE: {
|
||||
uint32_t pin =
|
||||
((aci_gap_numeric_comparison_value_event_rp0*)(blue_evt->data))->Numeric_Value;
|
||||
FURI_LOG_I(TAG, "Verify numeric comparison: %06ld", pin);
|
||||
FURI_LOG_I(TAG, "Verify numeric comparison: %06lu", pin);
|
||||
GapEvent event = {.type = GapEventTypePinCodeVerify, .data.pin_code = pin};
|
||||
bool result = gap->on_event_cb(event, gap->context);
|
||||
aci_gap_numeric_comparison_value_confirm_yesno(gap->service.connection_handle, result);
|
||||
@@ -245,7 +245,7 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void* pckt) {
|
||||
} else {
|
||||
FURI_LOG_I(TAG, "Pairing complete");
|
||||
GapEvent event = {.type = GapEventTypeConnected};
|
||||
gap->on_event_cb(event, gap->context);
|
||||
gap->on_event_cb(event, gap->context); //-V595
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -87,7 +87,7 @@ void hid_svc_start() {
|
||||
|
||||
#if(HID_SVC_REPORT_COUNT != 0)
|
||||
for(uint8_t i = 0; i < HID_SVC_REPORT_COUNT; i++) {
|
||||
if(i < HID_SVC_INPUT_REPORT_COUNT) {
|
||||
if(i < HID_SVC_INPUT_REPORT_COUNT) { //-V547
|
||||
uint8_t buf[2] = {i + 1, 1}; // 1 input
|
||||
char_uuid.Char_UUID_16 = REPORT_CHAR_UUID;
|
||||
status = aci_gatt_add_char(
|
||||
|
@@ -24,9 +24,9 @@
|
||||
/* Global variables ---------------------------------------------------------*/
|
||||
/* Private defines -----------------------------------------------------------*/
|
||||
#define HW_IPCC_TX_PENDING(channel) \
|
||||
(!(LL_C1_IPCC_IsActiveFlag_CHx(IPCC, channel))) && (((~(IPCC->C1MR)) & (channel << 16U)))
|
||||
(!(LL_C1_IPCC_IsActiveFlag_CHx(IPCC, channel))) && (((~(IPCC->C1MR)) & ((channel) << 16U)))
|
||||
#define HW_IPCC_RX_PENDING(channel) \
|
||||
(LL_C2_IPCC_IsActiveFlag_CHx(IPCC, channel)) && (((~(IPCC->C1MR)) & (channel << 0U)))
|
||||
(LL_C2_IPCC_IsActiveFlag_CHx(IPCC, channel)) && (((~(IPCC->C1MR)) & ((channel) << 0U)))
|
||||
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
|
Reference in New Issue
Block a user