From bea2eb719b5858ed580f37ee7817efde991fb5c1 Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Sat, 3 Sep 2022 03:36:42 +0200 Subject: [PATCH] write_file_with_random_name - don't cast strlen return result to different type --- runloop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runloop.c b/runloop.c index 3069d9422d..ab5fea35f2 100644 --- a/runloop.c +++ b/runloop.c @@ -3860,7 +3860,8 @@ static char *get_tmpdir_alloc(const char *override_dir) static bool write_file_with_random_name(char **temp_dll_path, const char *tmp_path, const void* data, ssize_t dataSize) { - int i, ext_len; + int i; + size_t ext_len; char number_buf[32]; bool okay = false; const char *prefix = "tmp"; @@ -3882,7 +3883,7 @@ static bool write_file_with_random_name(char **temp_dll_path, else ext = (char*)calloc(1,1); - ext_len = (int)strlen(ext); + ext_len = strlen(ext); if (ext_len > 0) {