1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 05:06:30 +04:00

Keys Dict: fix PVS warnings (#3299)

* keys dict: fix PVS warnings
* nfc app: suppress PVS warning
This commit is contained in:
gornekich
2023-12-19 16:11:35 +04:00
committed by GitHub
parent 25d24f1e4c
commit 6f6074dc01
2 changed files with 4 additions and 5 deletions

View File

@@ -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;
}
}