[libsoup] tests: Set default values for some variables
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] tests: Set default values for some variables
- Date: Mon, 27 Apr 2015 15:24:15 +0000 (UTC)
commit e4bf420dabb264e60b77c45da6376ea27a8bbfa1
Author: Philip Withnall <philip withnall collabora co uk>
Date: Mon Apr 27 11:09:29 2015 +0100
tests: Set default values for some variables
This eliminates a compiler warning about potentially using uninitialised
variables. It’s not actually possible for this happen (the variables are
only used on conditional paths with the same conditions as those where
they were previously set), but it’s easy enough to make this change to
shut the compiler up.
https://bugzilla.gnome.org/show_bug.cgi?id=748514
tests/timeout-test.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/timeout-test.c b/tests/timeout-test.c
index c783d9a..96505e9 100644
--- a/tests/timeout-test.c
+++ b/tests/timeout-test.c
@@ -54,8 +54,8 @@ do_msg_tests_for_session (SoupSession *timeout_session,
SoupURI *fast_uri,
SoupURI *slow_uri)
{
- SoupSocket *ret, *idle_first, *idle_second;
- SoupSocket *plain_first, *plain_second;
+ SoupSocket *ret, *idle_first = NULL, *idle_second;
+ SoupSocket *plain_first = NULL, *plain_second;
if (idle_session) {
g_signal_connect (idle_session, "request-started",
@@ -152,8 +152,8 @@ do_req_tests_for_session (SoupSession *timeout_session,
SoupURI *fast_uri,
SoupURI *slow_uri)
{
- SoupSocket *ret, *idle_first, *idle_second;
- SoupSocket *plain_first, *plain_second;
+ SoupSocket *ret, *idle_first = NULL, *idle_second;
+ SoupSocket *plain_first = NULL, *plain_second;
if (idle_session) {
g_signal_connect (idle_session, "request-started",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]