From 2414ca69d2c8bd08ce14c253b29d865dfbc0e0cb Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 23 Sep 2025 16:09:38 +0100 Subject: [PATCH] giowin32: Fix uninitialised variable error on msys2-clang64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I guess a compiler upgrade on msys2 has happened, because this wasn’t a problem before, and the code hasn’t changed. Fixes the warning: ``` ../glib/giowin32.c:1828:47: error: variable 'c' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 1828 | channel->is_writeable = WriteFile (handle, &c, 0, &count, NULL); | ^ 1 error generated. ``` Signed-off-by: Philip Withnall --- glib/giowin32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/giowin32.c b/glib/giowin32.c index ecc337aec..af0107455 100644 --- a/glib/giowin32.c +++ b/glib/giowin32.c @@ -1820,7 +1820,7 @@ g_io_win32_console_get_flags_internal (GIOChannel *channel) { GIOWin32Channel *win32_channel = (GIOWin32Channel *) channel; HANDLE handle = (HANDLE) _get_osfhandle (win32_channel->fd); - gchar c; + gchar c = 0; DWORD count; INPUT_RECORD record;