diff --git a/applications/debug/bt_debug_app/views/bt_test.c b/applications/debug/bt_debug_app/views/bt_test.c index 58b65e1947..c15c6a5e40 100644 --- a/applications/debug/bt_debug_app/views/bt_test.c +++ b/applications/debug/bt_debug_app/views/bt_test.c @@ -18,7 +18,7 @@ struct BtTestParam { void* context; }; -ARRAY_DEF(BtTestParamArray, BtTestParam, M_POD_OPLIST); +ARRAY_DEF(BtTestParamArray, BtTestParam, M_POD_OPLIST); //-V658 struct BtTest { View* view; diff --git a/applications/main/infrared/infrared_brute_force.c b/applications/main/infrared/infrared_brute_force.c index 1ec4645e97..519bbbb4b1 100644 --- a/applications/main/infrared/infrared_brute_force.c +++ b/applications/main/infrared/infrared_brute_force.c @@ -7,7 +7,7 @@ #include "infrared_signal.h" -ARRAY_DEF(SignalPositionArray, size_t, M_DEFAULT_OPLIST); +ARRAY_DEF(SignalPositionArray, size_t, M_DEFAULT_OPLIST); //-V658 typedef struct { size_t index; diff --git a/applications/main/nfc/helpers/mfkey32_logger.c b/applications/main/nfc/helpers/mfkey32_logger.c index bdd899a368..ce3b875cf6 100644 --- a/applications/main/nfc/helpers/mfkey32_logger.c +++ b/applications/main/nfc/helpers/mfkey32_logger.c @@ -21,7 +21,7 @@ typedef struct { uint32_t ar1; } Mfkey32LoggerParams; -ARRAY_DEF(Mfkey32LoggerParams, Mfkey32LoggerParams, M_POD_OPLIST); +ARRAY_DEF(Mfkey32LoggerParams, Mfkey32LoggerParams, M_POD_OPLIST); //-V658 struct Mfkey32Logger { uint32_t cuid; diff --git a/applications/main/nfc/helpers/nfc_supported_cards.c b/applications/main/nfc/helpers/nfc_supported_cards.c index 6513eef5f6..77c33b142e 100644 --- a/applications/main/nfc/helpers/nfc_supported_cards.c +++ b/applications/main/nfc/helpers/nfc_supported_cards.c @@ -29,7 +29,7 @@ typedef struct { NfcSupportedCardsPluginFeature feature; } NfcSupportedCardsPluginCache; -ARRAY_DEF(NfcSupportedCardsPluginCache, NfcSupportedCardsPluginCache, M_POD_OPLIST); +ARRAY_DEF(NfcSupportedCardsPluginCache, NfcSupportedCardsPluginCache, M_POD_OPLIST); //-V658 typedef enum { NfcSupportedCardsLoadStateIdle, diff --git a/applications/main/onewire/onewire_cli.c b/applications/main/onewire/onewire_cli.c index 193de76e4e..17e5aaf550 100644 --- a/applications/main/onewire/onewire_cli.c +++ b/applications/main/onewire/onewire_cli.c @@ -25,7 +25,7 @@ static void onewire_cli_search(PipeSide* pipe) { onewire_host_start(onewire); power_enable_otg(power, true); - while(!done) { + while(!done) { //-V1044 if(onewire_host_search(onewire, address, OneWireHostSearchModeNormal) != 1) { printf("Search finished\r\n"); onewire_host_reset_search(onewire); diff --git a/applications/main/subghz/helpers/subghz_frequency_analyzer_log_item_array.h b/applications/main/subghz/helpers/subghz_frequency_analyzer_log_item_array.h index 6e6b553e00..a3086c508d 100644 --- a/applications/main/subghz/helpers/subghz_frequency_analyzer_log_item_array.h +++ b/applications/main/subghz/helpers/subghz_frequency_analyzer_log_item_array.h @@ -35,7 +35,7 @@ TUPLE_DEF2( //-V1048 M_DEFAULT_OPLIST) /* Define the array, register the oplist and define further algorithms on it */ -ARRAY_DEF(SubGhzFrequencyAnalyzerLogItemArray, SubGhzFrequencyAnalyzerLogItem_t) //-V779 +ARRAY_DEF(SubGhzFrequencyAnalyzerLogItemArray, SubGhzFrequencyAnalyzerLogItem_t) //-V779 //-V658 #define M_OPL_SubGhzFrequencyAnalyzerLogItemArray_t() \ ARRAY_OPLIST(SubGhzFrequencyAnalyzerLogItemArray, M_OPL_SubGhzFrequencyAnalyzerLogItem_t()) ALGO_DEF(SubGhzFrequencyAnalyzerLogItemArray, SubGhzFrequencyAnalyzerLogItemArray_t) diff --git a/applications/main/subghz/subghz_history.c b/applications/main/subghz/subghz_history.c index 85e59ae079..8043b57524 100644 --- a/applications/main/subghz/subghz_history.c +++ b/applications/main/subghz/subghz_history.c @@ -16,7 +16,7 @@ typedef struct { SubGhzRadioPreset* preset; } SubGhzHistoryItem; -ARRAY_DEF(SubGhzHistoryItemArray, SubGhzHistoryItem, M_POD_OPLIST) +ARRAY_DEF(SubGhzHistoryItemArray, SubGhzHistoryItem, M_POD_OPLIST) //-V658 #define M_OPL_SubGhzHistoryItemArray_t() ARRAY_OPLIST(SubGhzHistoryItemArray, M_POD_OPLIST) diff --git a/applications/main/subghz/views/receiver.c b/applications/main/subghz/views/receiver.c index ea74f8c6c6..cec68abbf7 100644 --- a/applications/main/subghz/views/receiver.c +++ b/applications/main/subghz/views/receiver.c @@ -18,7 +18,7 @@ typedef struct { uint8_t type; } SubGhzReceiverMenuItem; -ARRAY_DEF(SubGhzReceiverMenuItemArray, SubGhzReceiverMenuItem, M_POD_OPLIST) +ARRAY_DEF(SubGhzReceiverMenuItemArray, SubGhzReceiverMenuItem, M_POD_OPLIST) //-V658 #define M_OPL_SubGhzReceiverMenuItemArray_t() \ ARRAY_OPLIST(SubGhzReceiverMenuItemArray, M_POD_OPLIST) diff --git a/applications/services/desktop/animations/views/bubble_animation_view.c b/applications/services/desktop/animations/views/bubble_animation_view.c index cea039671d..82740237c1 100644 --- a/applications/services/desktop/animations/views/bubble_animation_view.c +++ b/applications/services/desktop/animations/views/bubble_animation_view.c @@ -93,12 +93,17 @@ static const FrameBubble* bubble_animation_pick_bubble(BubbleAnimationViewModel* model, bool active) { const FrameBubble* bubble = NULL; - if((model->active_bubbles == 0) && (model->passive_bubbles == 0)) { + // Check for division by zero based on the active parameter + if((active && model->active_bubbles == 0) || (!active && model->passive_bubbles == 0)) { return NULL; } - uint8_t index = - furi_hal_random_get() % (active ? model->active_bubbles : model->passive_bubbles); + uint8_t random_value = furi_hal_random_get(); + // In case random generator return zero lets set it to 3 + if(random_value == 0) { + random_value = 3; + } + uint8_t index = random_value % (active ? model->active_bubbles : model->passive_bubbles); const BubbleAnimation* animation = model->current; for(int i = 0; i < animation->frame_bubble_sequences_count; ++i) { diff --git a/applications/services/gui/canvas_i.h b/applications/services/gui/canvas_i.h index 449db71dbc..cc918f8df3 100644 --- a/applications/services/gui/canvas_i.h +++ b/applications/services/gui/canvas_i.h @@ -29,7 +29,7 @@ typedef struct { void* context; } CanvasCallbackPair; -ARRAY_DEF(CanvasCallbackPairArray, CanvasCallbackPair, M_POD_OPLIST); +ARRAY_DEF(CanvasCallbackPairArray, CanvasCallbackPair, M_POD_OPLIST); //-V658 #define M_OPL_CanvasCallbackPairArray_t() ARRAY_OPLIST(CanvasCallbackPairArray, M_POD_OPLIST) diff --git a/applications/services/gui/elements.c b/applications/services/gui/elements.c index 3e12c09cca..f4caf7da79 100644 --- a/applications/services/gui/elements.c +++ b/applications/services/gui/elements.c @@ -854,7 +854,7 @@ void elements_text_box( for(size_t i = 0; i < line_num; i++) { for(size_t j = 0; j < line[i].len; j++) { // Process format symbols - if(line[i].text[j] == '\e' && j < line[i].len - 1) { + if(line[i].text[j] == '\e' && j < line[i].len - 1) { //-V781 ++j; if(line[i].text[j] == ELEMENTS_BOLD_MARKER) { if(bold) { diff --git a/applications/services/gui/modules/button_menu.c b/applications/services/gui/modules/button_menu.c index 5204c6f225..095c57b3ce 100644 --- a/applications/services/gui/modules/button_menu.c +++ b/applications/services/gui/modules/button_menu.c @@ -25,7 +25,7 @@ struct ButtonMenuItem { void* callback_context; }; -ARRAY_DEF(ButtonMenuItemArray, ButtonMenuItem, M_POD_OPLIST); +ARRAY_DEF(ButtonMenuItemArray, ButtonMenuItem, M_POD_OPLIST); //-V658 struct ButtonMenu { View* view; diff --git a/applications/services/gui/modules/button_panel.c b/applications/services/gui/modules/button_panel.c index efc512bc5d..c718649b1a 100644 --- a/applications/services/gui/modules/button_panel.c +++ b/applications/services/gui/modules/button_panel.c @@ -98,7 +98,7 @@ void button_panel_reserve(ButtonPanel* button_panel, size_t reserve_x, size_t re furi_check(reserve_x > 0); furi_check(reserve_y > 0); - with_view_model( + with_view_model( //-V621 button_panel->view, ButtonPanelModel * model, { diff --git a/applications/services/gui/modules/file_browser_worker.c b/applications/services/gui/modules/file_browser_worker.c index 521666e6d2..457345ff24 100644 --- a/applications/services/gui/modules/file_browser_worker.c +++ b/applications/services/gui/modules/file_browser_worker.c @@ -32,8 +32,8 @@ typedef enum { (WorkerEvtStop | WorkerEvtLoad | WorkerEvtFolderEnter | WorkerEvtFolderExit | \ WorkerEvtFolderRefresh | WorkerEvtConfigChange) -ARRAY_DEF(IdxLastArray, int32_t) -ARRAY_DEF(ExtFilterArray, FuriString*, FURI_STRING_OPLIST) +ARRAY_DEF(IdxLastArray, int32_t) //-V658 +ARRAY_DEF(ExtFilterArray, FuriString*, FURI_STRING_OPLIST) //-V658 struct BrowserWorker { FuriThread* thread; diff --git a/applications/services/gui/modules/menu.c b/applications/services/gui/modules/menu.c index 012fa17d6c..5e9452b537 100644 --- a/applications/services/gui/modules/menu.c +++ b/applications/services/gui/modules/menu.c @@ -17,7 +17,7 @@ typedef struct { void* callback_context; } MenuItem; -ARRAY_DEF(MenuItemArray, MenuItem, M_POD_OPLIST); +ARRAY_DEF(MenuItemArray, MenuItem, M_POD_OPLIST); //-V658 #define M_OPL_MenuItemArray_t() ARRAY_OPLIST(MenuItemArray, M_POD_OPLIST) diff --git a/applications/services/gui/modules/variable_item_list.c b/applications/services/gui/modules/variable_item_list.c index f8110034e5..aec0c7080c 100644 --- a/applications/services/gui/modules/variable_item_list.c +++ b/applications/services/gui/modules/variable_item_list.c @@ -14,7 +14,7 @@ struct VariableItem { void* context; }; -ARRAY_DEF(VariableItemArray, VariableItem, M_POD_OPLIST); +ARRAY_DEF(VariableItemArray, VariableItem, M_POD_OPLIST); //-V658 struct VariableItemList { View* view; diff --git a/applications/services/gui/modules/widget_elements/widget_element_text_scroll.c b/applications/services/gui/modules/widget_elements/widget_element_text_scroll.c index 491ffc6bc3..866aad815c 100644 --- a/applications/services/gui/modules/widget_elements/widget_element_text_scroll.c +++ b/applications/services/gui/modules/widget_elements/widget_element_text_scroll.c @@ -10,7 +10,7 @@ typedef struct { FuriString* text; } TextScrollLineArray; -ARRAY_DEF(TextScrollLineArray, TextScrollLineArray, M_POD_OPLIST) +ARRAY_DEF(TextScrollLineArray, TextScrollLineArray, M_POD_OPLIST) //-V658 typedef struct { TextScrollLineArray_t line_array; diff --git a/applications/services/gui/scene_manager_i.h b/applications/services/gui/scene_manager_i.h index 85f7e7bee9..8bfe469938 100644 --- a/applications/services/gui/scene_manager_i.h +++ b/applications/services/gui/scene_manager_i.h @@ -8,7 +8,7 @@ #include "scene_manager.h" #include -ARRAY_DEF(SceneManagerIdStack, uint32_t, M_DEFAULT_OPLIST); +ARRAY_DEF(SceneManagerIdStack, uint32_t, M_DEFAULT_OPLIST); //-V658 typedef struct { uint32_t state; diff --git a/applications/services/loader/loader.c b/applications/services/loader/loader.c index 7b37f2510f..341994a23a 100644 --- a/applications/services/loader/loader.c +++ b/applications/services/loader/loader.c @@ -88,6 +88,7 @@ static void loader_show_gui_error( LoaderMessageLoaderStatusResult status, const char* name, FuriString* error_message) { + furi_check(name); DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS); DialogMessage* message = dialog_message_alloc(); @@ -609,6 +610,8 @@ static LoaderMessageLoaderStatusResult loader_do_start_by_name( status.value = loader_make_success_status(error_message); status.error = LoaderStatusErrorUnknown; + if(name == NULL) return status; + LoaderEvent event; event.type = LoaderEventTypeApplicationBeforeLoad; furi_pubsub_publish(loader->pubsub, &event); @@ -835,7 +838,10 @@ int32_t loader_srv(void* p) { switch(message.type) { case LoaderMessageTypeStartByName: { LoaderMessageLoaderStatusResult status = loader_do_start_by_name( - loader, message.start.name, message.start.args, message.start.error_message); + loader, + message.start.name, + message.start.args, + message.start.error_message); //-V595 *(message.status_value) = status; if(status.value != LoaderStatusOk) loader_do_emit_queue_empty_event(loader); api_lock_unlock(message.api_lock); @@ -844,7 +850,7 @@ int32_t loader_srv(void* p) { case LoaderMessageTypeStartByNameDetachedWithGuiError: { FuriString* error_message = furi_string_alloc(); LoaderMessageLoaderStatusResult status = loader_do_start_by_name( - loader, message.start.name, message.start.args, error_message); + loader, message.start.name, message.start.args, error_message); //-V595 loader_show_gui_error(status, message.start.name, error_message); if(status.value != LoaderStatusOk) loader_do_emit_queue_empty_event(loader); if(message.start.name) free((void*)message.start.name); diff --git a/applications/services/rpc/rpc_storage.c b/applications/services/rpc/rpc_storage.c index 163535f9a6..df65f84a15 100644 --- a/applications/services/rpc/rpc_storage.c +++ b/applications/services/rpc/rpc_storage.c @@ -293,7 +293,7 @@ static void rpc_system_storage_list_process(const PB_Main* request, void* contex finish = true; } - while(!finish) { + while(!finish) { //-V1044 FileInfo fileinfo; char* name = malloc(MAX_NAME_LENGTH + 1); if(storage_dir_read(dir, &fileinfo, name, MAX_NAME_LENGTH)) { diff --git a/applications/services/rpc/rpc_system.c b/applications/services/rpc/rpc_system.c index 1cc0f90eb2..4bf923d7f5 100644 --- a/applications/services/rpc/rpc_system.c +++ b/applications/services/rpc/rpc_system.c @@ -30,7 +30,8 @@ static void rpc_system_system_ping_process(const PB_Main* request, void* context } PB_Main response = PB_Main_init_default; - response.command_status = PB_CommandStatus_OK; + // PB_CommandStatus_OK is 0 in current case, and var by default is 0 too, commenting PVS warn + response.command_status = PB_CommandStatus_OK; //-V1048 response.command_id = request->command_id; response.which_content = PB_Main_system_ping_response_tag; diff --git a/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c b/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c index 17ef883587..dee7ad7bdc 100644 --- a/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c +++ b/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c @@ -76,7 +76,7 @@ void desktop_settings_scene_favorite_on_enter(void* context) { default_passport = true; } } else { - favorite_id &= ~(SCENE_STATE_SET_DUMMY_APP); + favorite_id &= ~(SCENE_STATE_SET_DUMMY_APP); //-V784 furi_assert(favorite_id < DummyAppNumber); curr_favorite_app = &app->settings.dummy_apps[favorite_id]; default_passport = true; @@ -182,7 +182,7 @@ bool desktop_settings_scene_favorite_on_event(void* context, SceneManagerEvent e furi_assert(favorite_id < FavoriteAppNumber); curr_favorite_app = &app->settings.favorite_apps[favorite_id]; } else { - favorite_id &= ~(SCENE_STATE_SET_DUMMY_APP); + favorite_id &= ~(SCENE_STATE_SET_DUMMY_APP); //-V784 furi_assert(favorite_id < DummyAppNumber); curr_favorite_app = &app->settings.dummy_apps[favorite_id]; } diff --git a/applications/system/js_app/js_modules.c b/applications/system/js_app/js_modules.c index 095880f17a..d7f38ba04a 100644 --- a/applications/system/js_app/js_modules.c +++ b/applications/system/js_app/js_modules.c @@ -27,7 +27,7 @@ typedef struct { // - an rbtree because i deemed it more tedious to implement, and with the // amount of modules in use (under 10 in the overwhelming majority of cases) // i bet it's going to be slower than a plain array -ARRAY_DEF(JsModuleArray, JsModuleData, M_POD_OPLIST); +ARRAY_DEF(JsModuleArray, JsModuleData, M_POD_OPLIST); //-V658 #define M_OPL_JsModuleArray_t() ARRAY_OPLIST(JsModuleArray) static const JsModuleDescriptor modules_builtin[] = { diff --git a/applications/system/js_app/modules/js_serial.c b/applications/system/js_app/modules/js_serial.c index d903939cef..78f4db63a0 100644 --- a/applications/system/js_app/modules/js_serial.c +++ b/applications/system/js_app/modules/js_serial.c @@ -20,7 +20,7 @@ typedef struct { char* data; } PatternArrayItem; -ARRAY_DEF(PatternArray, PatternArrayItem, M_POD_OPLIST); +ARRAY_DEF(PatternArray, PatternArrayItem, M_POD_OPLIST); //-V658 static void js_serial_on_async_rx(FuriHalSerialHandle* handle, FuriHalSerialRxEvent event, void* context) { diff --git a/lib/drivers/lp5562.c b/lib/drivers/lp5562.c index 7db9bbce4b..18f9989972 100644 --- a/lib/drivers/lp5562.c +++ b/lib/drivers/lp5562.c @@ -192,6 +192,9 @@ void lp5562_execute_ramp( // Prepare command sequence uint16_t program[16]; uint8_t diff = (val_end > val_start) ? (val_end - val_start) : (val_start - val_end); + if(diff == 0) { // Making division below safer + diff = 1; + } uint16_t time_step = time * 2 / diff; uint8_t prescaller = 0; if(time_step > 0x3F) { diff --git a/lib/music_worker/music_worker.c b/lib/music_worker/music_worker.c index ce91f60295..420f17f297 100644 --- a/lib/music_worker/music_worker.c +++ b/lib/music_worker/music_worker.c @@ -26,7 +26,7 @@ typedef struct { uint8_t dots; } NoteBlock; -ARRAY_DEF(NoteBlockArray, NoteBlock, M_POD_OPLIST); +ARRAY_DEF(NoteBlockArray, NoteBlock, M_POD_OPLIST); //-V658 struct MusicWorker { FuriThread* thread; diff --git a/lib/print/printf_tiny.c b/lib/print/printf_tiny.c index 387a6451e2..96d9794507 100644 --- a/lib/print/printf_tiny.c +++ b/lib/print/printf_tiny.c @@ -650,7 +650,7 @@ static int // evaluate flags flags = 0U; - do { + do { //-V1044 switch(*format) { case '0': flags |= FLAGS_ZEROPAD; diff --git a/lib/subghz/protocols/bin_raw.c b/lib/subghz/protocols/bin_raw.c index e90f1508e5..a1e0e816b9 100644 --- a/lib/subghz/protocols/bin_raw.c +++ b/lib/subghz/protocols/bin_raw.c @@ -455,7 +455,7 @@ static bool //sort by number of occurrences bool swap = true; - while(swap) { + while(swap) { //-V1044 swap = false; for(size_t i = 1; i < BIN_RAW_SEARCH_CLASSES; i++) { if(classes[i].count > classes[i - 1].count) { @@ -571,7 +571,7 @@ static bool bit_count = 0; if(data_markup_ind == BIN_RAW_MAX_MARKUP_COUNT) break; - ind &= 0xFFFFFFF8; //jump to the pre whole byte + ind &= 0xFFFFFFF8; //jump to the pre whole byte //-V784 } } while(gap_ind != 0); if((data_markup_ind != BIN_RAW_MAX_MARKUP_COUNT) && (ind != 0)) { diff --git a/lib/subghz/receiver.c b/lib/subghz/receiver.c index 88fac4e34b..e7dff3b9ad 100644 --- a/lib/subghz/receiver.c +++ b/lib/subghz/receiver.c @@ -8,7 +8,7 @@ typedef struct { SubGhzProtocolEncoderBase* base; } SubGhzReceiverSlot; -ARRAY_DEF(SubGhzReceiverSlotArray, SubGhzReceiverSlot, M_POD_OPLIST); +ARRAY_DEF(SubGhzReceiverSlotArray, SubGhzReceiverSlot, M_POD_OPLIST); //-V658 #define M_OPL_SubGhzReceiverSlotArray_t() ARRAY_OPLIST(SubGhzReceiverSlotArray, M_POD_OPLIST) struct SubGhzReceiver { diff --git a/lib/subghz/subghz_keystore.h b/lib/subghz/subghz_keystore.h index 6138651eb2..b1bca96259 100644 --- a/lib/subghz/subghz_keystore.h +++ b/lib/subghz/subghz_keystore.h @@ -14,7 +14,7 @@ typedef struct { uint16_t type; } SubGhzKey; -ARRAY_DEF(SubGhzKeyArray, SubGhzKey, M_POD_OPLIST) +ARRAY_DEF(SubGhzKeyArray, SubGhzKey, M_POD_OPLIST) //-V658 #define M_OPL_SubGhzKeyArray_t() ARRAY_OPLIST(SubGhzKeyArray, M_POD_OPLIST) diff --git a/lib/subghz/subghz_setting.c b/lib/subghz/subghz_setting.c index 12b7bd16a0..ff1753d25e 100644 --- a/lib/subghz/subghz_setting.c +++ b/lib/subghz/subghz_setting.c @@ -163,7 +163,7 @@ typedef struct { size_t custom_preset_data_size; } SubGhzSettingCustomPresetItem; -ARRAY_DEF(SubGhzSettingCustomPresetItemArray, SubGhzSettingCustomPresetItem, M_POD_OPLIST) +ARRAY_DEF(SubGhzSettingCustomPresetItemArray, SubGhzSettingCustomPresetItem, M_POD_OPLIST) //-V658 #define M_OPL_SubGhzSettingCustomPresetItemArray_t() \ ARRAY_OPLIST(SubGhzSettingCustomPresetItemArray, M_POD_OPLIST) diff --git a/lib/toolbox/cli/shell/cli_shell_completions.c b/lib/toolbox/cli/shell/cli_shell_completions.c index 6b6634dbb9..64133fe93c 100644 --- a/lib/toolbox/cli/shell/cli_shell_completions.c +++ b/lib/toolbox/cli/shell/cli_shell_completions.c @@ -1,6 +1,6 @@ #include "cli_shell_completions.h" -ARRAY_DEF(CommandCompletions, FuriString*, FURI_STRING_OPLIST); // -V524 +ARRAY_DEF(CommandCompletions, FuriString*, FURI_STRING_OPLIST); // -V524 //-V658 #define M_OPL_CommandCompletions_t() ARRAY_OPLIST(CommandCompletions) struct CliShellCompletions { diff --git a/lib/toolbox/strint.c b/lib/toolbox/strint.c index 8c7f36976a..113becd052 100644 --- a/lib/toolbox/strint.c +++ b/lib/toolbox/strint.c @@ -80,7 +80,7 @@ StrintParseError strint_to_uint64_internal( if(result > mul_limit) return StrintParseOverflowError; result *= base; - if(result > limit - digit_value) return StrintParseOverflowError; + if(result > limit - digit_value) return StrintParseOverflowError; //-V658 result += digit_value; read_total++; diff --git a/targets/f7/src/stm32wb55_startup.c b/targets/f7/src/stm32wb55_startup.c index 1c1cfdcc37..6aecab06ba 100644 --- a/targets/f7/src/stm32wb55_startup.c +++ b/targets/f7/src/stm32wb55_startup.c @@ -68,7 +68,7 @@ void SystemInit(void) { RCC->PLLSAI1CFGR = 0x22041000U; #endif // Reset HSEBYP bit - RCC->CR &= 0xFFFBFFFFU; + RCC->CR &= 0xFFFBFFFFU; //-V784 // Disable all RCC related interrupts RCC->CIER = 0x00000000; }