Code cleanup: srand, PVS warnings (#1974)
* Remove srand invocation * PVS High priority fixes * PVS High errors part 2 * Furi: heap tracing inheritance * Furi add __builtin_unreachable to furi_thread_catch
This commit is contained in:
@@ -275,7 +275,7 @@ static void storage_cli_read_chunks(Cli* cli, FuriString* path, FuriString* args
|
||||
uint32_t buffer_size;
|
||||
int parsed_count = sscanf(furi_string_get_cstr(args), "%lu", &buffer_size);
|
||||
|
||||
if(parsed_count == EOF || parsed_count != 1) {
|
||||
if(parsed_count != 1) {
|
||||
storage_cli_print_usage();
|
||||
} else if(storage_file_open(file, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING)) {
|
||||
uint64_t file_size = storage_file_size(file);
|
||||
@@ -315,7 +315,7 @@ static void storage_cli_write_chunk(Cli* cli, FuriString* path, FuriString* args
|
||||
uint32_t buffer_size;
|
||||
int parsed_count = sscanf(furi_string_get_cstr(args), "%lu", &buffer_size);
|
||||
|
||||
if(parsed_count == EOF || parsed_count != 1) {
|
||||
if(parsed_count != 1) {
|
||||
storage_cli_print_usage();
|
||||
} else {
|
||||
if(storage_file_open(file, furi_string_get_cstr(path), FSAM_WRITE, FSOM_OPEN_APPEND)) {
|
||||
|
@@ -545,8 +545,8 @@ static FS_Error
|
||||
|
||||
FS_Error storage_common_merge(Storage* storage, const char* old_path, const char* new_path) {
|
||||
FS_Error error;
|
||||
const char* new_path_tmp;
|
||||
FuriString* new_path_next;
|
||||
const char* new_path_tmp = NULL;
|
||||
FuriString* new_path_next = NULL;
|
||||
new_path_next = furi_string_alloc();
|
||||
|
||||
FileInfo fileinfo;
|
||||
|
Reference in New Issue
Block a user