[glib] gio/tests/memory-output-stream.c: Avoid an uninitialized variable
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio/tests/memory-output-stream.c: Avoid an uninitialized variable
- Date: Wed, 27 Nov 2013 00:02:43 +0000 (UTC)
commit b9322bf9abe2e61718b2b1c57aa09b18946a2d35
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Nov 15 13:00:55 2013 +0800
gio/tests/memory-output-stream.c: Avoid an uninitialized variable
Be a little bit more careful in regards to initializing a primitive type
variable before passing it by reference, as it could have random stuff
in the variable's address depending on the CRT, such as MSVCR110.DLL,
causing random, invalid stuff being written in that address.
This will fix this test when built with Visual Studio 2012.
https://bugzilla.gnome.org/show_bug.cgi?id=711047
gio/tests/memory-output-stream.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/memory-output-stream.c b/gio/tests/memory-output-stream.c
index b8e6697..a8b389a 100644
--- a/gio/tests/memory-output-stream.c
+++ b/gio/tests/memory-output-stream.c
@@ -209,7 +209,7 @@ test_properties (void)
int i;
GError *error = NULL;
gsize data_size_fun;
- gsize data_size_prop;
+ gsize data_size_prop = 0;
gpointer data_fun;
gpointer data_prop;
gpointer func;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]