On Sun, 18 Sep 2022, Pali Rohár wrote:

stdio/_vscprintf.c: In function ‘emu_vscprintf’:
stdio/_vscprintf.c:47:8: warning: ‘ret’ may be used uninitialized in this 
function [-Wmaybe-uninitialized]
    if (ret < 0) {
       ^
---
mingw-w64-crt/stdio/_vscprintf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-crt/stdio/_vscprintf.c b/mingw-w64-crt/stdio/_vscprintf.c
index b859b9a2a028..bb596b4d67dc 100644
--- a/mingw-w64-crt/stdio/_vscprintf.c
+++ b/mingw-w64-crt/stdio/_vscprintf.c
@@ -15,7 +15,7 @@ static int __cdecl emu_vscprintf(const char * __restrict__ 
format, va_list argli
{
    char *buffer, *new_buffer;
    size_t size;
-    int ret;
+    int ret = -1;

    /* if format is a null pointer, _vscprintf() returns -1 and sets errno to 
EINVAL */
    if (!format) {
--
2.20.1

LGTM, I can push this later.

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to