diff --git a/contrib/win32/win32compat/console.c b/contrib/win32/win32compat/console.c index 396bd7f63..f34a8d19d 100644 --- a/contrib/win32/win32compat/console.c +++ b/contrib/win32/win32compat/console.c @@ -627,16 +627,14 @@ ConWriteString(char* pszString, int cbString) if ((needed = MultiByteToWideChar(CP_UTF8, 0, pszString, cbString, NULL, 0)) == 0 || (utf16 = malloc(needed * sizeof(wchar_t))) == NULL || (cnt = MultiByteToWideChar(CP_UTF8, 0, pszString, cbString, utf16, needed)) == 0) { - const char* pszStringConst = pszString; - Result = (DWORD)printf_s(pszStringConst); + Result = (DWORD)printf_s(pszString); // CodeQL [SM01734] false positive: call is not format string with arguments. } else { if (GetConsoleOutputHandle()) WriteConsoleW(GetConsoleOutputHandle(), utf16, cnt, &Result, 0); else { - const wchar_t* utf16Const = utf16; - Result = (DWORD)wprintf_s(utf16Const); + Result = (DWORD)wprintf_s(utf16); // CodeQL [SM01734] false positive: call is not format string with arguments. } }