mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-23 05:14:16 +03:00
Keys Dict: fix PVS warnings (#3299)
* keys dict: fix PVS warnings * nfc app: suppress PVS warning
This commit is contained in:
parent
25d24f1e4c
commit
6f6074dc01
@ -343,7 +343,7 @@ bool nfc_load_file(NfcApp* instance, FuriString* path, bool show_dialog) {
|
||||
nfc_supported_cards_load_cache(instance->nfc_supported_cards);
|
||||
|
||||
FuriString* load_path = furi_string_alloc();
|
||||
if(nfc_has_shadow_file_internal(instance, path)) {
|
||||
if(nfc_has_shadow_file_internal(instance, path)) { //-V1051
|
||||
nfc_set_shadow_file_path(path, load_path);
|
||||
} else if(furi_string_end_with(path, NFC_APP_SHADOW_EXTENSION)) {
|
||||
size_t path_len = furi_string_size(path);
|
||||
|
@ -108,7 +108,7 @@ KeysDict* keys_dict_alloc(const char* path, KeysDictMode mode, size_t key_size)
|
||||
}
|
||||
}
|
||||
stream_rewind(instance->stream);
|
||||
FURI_LOG_I(TAG, "Loaded dictionary with %u keys", instance->total_keys);
|
||||
FURI_LOG_I(TAG, "Loaded dictionary with %zu keys", instance->total_keys);
|
||||
|
||||
furi_string_free(line);
|
||||
|
||||
@ -299,13 +299,12 @@ bool keys_dict_delete_key(KeysDict* instance, const uint8_t* key, size_t key_siz
|
||||
furi_assert(key);
|
||||
|
||||
bool key_removed = false;
|
||||
bool is_endfile = false;
|
||||
|
||||
uint8_t* temp_key = malloc(key_size);
|
||||
|
||||
stream_rewind(instance->stream);
|
||||
|
||||
while(!key_removed && !is_endfile) {
|
||||
while(!key_removed) {
|
||||
if(!keys_dict_get_next_key(instance, temp_key, key_size)) {
|
||||
break;
|
||||
}
|
||||
@ -332,4 +331,4 @@ bool keys_dict_delete_key(KeysDict* instance, const uint8_t* key, size_t key_siz
|
||||
free(temp_key);
|
||||
|
||||
return key_removed;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user