[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:
Georgii Surkov
2022-12-26 15:13:30 +03:00
committed by GitHub
parent ad3bff0b67
commit 8582670a34
201 changed files with 719 additions and 743 deletions

View File

@@ -13,7 +13,7 @@ ArchiveAppTypeEnum archive_get_app_type(const char* path) {
}
app_name++;
for(size_t i = 0; i < COUNT_OF(known_apps); i++) {
for(size_t i = 0; i < COUNT_OF(known_apps); i++) { //-V1008
if(strncmp(app_name, known_apps[i], strlen(known_apps[i])) == 0) {
return i;
}

View File

@@ -177,7 +177,7 @@ bool archive_favorites_read(void* context) {
archive_set_item_count(browser, file_count);
if(need_refresh) {
if(need_refresh) { //-V547
archive_favourites_rescan();
}

View File

@@ -116,7 +116,7 @@ bool archive_scene_browser_on_event(void* context, SceneManagerEvent event) {
case ArchiveBrowserEventFileMenuPin: {
const char* name = archive_get_name(browser);
if(favorites) {
archive_favorites_delete(name);
archive_favorites_delete("%s", name);
archive_file_array_rm_selected(browser);
archive_show_file_menu(browser, false);
} else if(archive_is_known_app(selected->type)) {