[glib: 6/10] Fix non-initialized variable in glib/giowin32.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 6/10] Fix non-initialized variable in glib/giowin32.c
- Date: Fri, 18 Feb 2022 13:45:44 +0000 (UTC)
commit 7304e4de17490dabe8956ee5ffc3826cabff90e0
Author: Loic Le Page <llepage fluendo com>
Date: Wed Jan 19 18:59:37 2022 +0100
Fix non-initialized variable in glib/giowin32.c
glib/giowin32.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glib/giowin32.c b/glib/giowin32.c
index 72cd9220c..7282e1a54 100644
--- a/glib/giowin32.c
+++ b/glib/giowin32.c
@@ -815,7 +815,7 @@ g_io_win32_check (GSource *source)
GIOWin32Watch *watch = (GIOWin32Watch *)source;
GIOWin32Channel *channel = (GIOWin32Channel *)watch->channel;
GIOCondition buffer_condition = g_io_channel_get_buffer_condition (watch->channel);
- WSANETWORKEVENTS events;
+ WSANETWORKEVENTS events = { 0 };
if (channel->debug)
g_print ("g_io_win32_check: source=%p channel=%p", source, channel);
@@ -1452,7 +1452,7 @@ g_io_win32_sock_read (GIOChannel *channel,
GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel;
gint result;
GIOChannelError error;
- int winsock_error;
+ int winsock_error = 0;
if (win32_channel->debug)
g_print ("g_io_win32_sock_read: channel=%p sock=%d count=%" G_GSIZE_FORMAT,
@@ -1513,8 +1513,8 @@ g_io_win32_sock_write (GIOChannel *channel,
GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel;
gint result;
GIOChannelError error;
- int winsock_error;
-
+ int winsock_error = 0;
+
if (win32_channel->debug)
g_print ("g_io_win32_sock_write: channel=%p sock=%d count=%" G_GSIZE_FORMAT,
channel, win32_channel->fd, count);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]