From 781c14c4ed7c582bb7213208fe12262d9ecb7724 Mon Sep 17 00:00:00 2001 From: Tal Regev Date: Mon, 5 Aug 2024 01:03:09 +0300 Subject: [PATCH] tool_operhlp: fix "potentially uninitialized local variable 'pc' used" A false positive by MSVC. Closes #14389 --- src/tool_operhlp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c index 8d356d9e4a..be5bc0a260 100644 --- a/src/tool_operhlp.c +++ b/src/tool_operhlp.c @@ -182,7 +182,6 @@ fail: */ CURLcode get_url_file_name(char **filename, const char *url) { - char *pc, *pc2; CURLU *uh = curl_url(); char *path = NULL; CURLUcode uerr; @@ -199,7 +198,7 @@ CURLcode get_url_file_name(char **filename, const char *url) uh = NULL; if(!uerr) { int i; - + char *pc = NULL, *pc2 = NULL; for(i = 0; i < 2; i++) { pc = strrchr(path, '/'); pc2 = strrchr(pc ? pc + 1 : path, '\\');