From: Kamil Dudka Date: Tue, 19 Apr 2016 07:38:44 +0000 (+0200) Subject: connect: make sure that rc is initialized in singleipconnect() X-Git-Tag: curl-7_49_0~110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad3d40d40707f1c5f37f878a61de4a8f0aeac2b8;p=curl connect: make sure that rc is initialized in singleipconnect() This commit fixes a Clang warning introduced in curl-7_48_0-190-g8f72b13: Error: CLANG_WARNING: lib/connect.c:1120:11: warning: The right operand of '==' is a garbage value 1118| } 1119| 1120|-> if(-1 == rc) 1121| error = SOCKERRNO; 1122| } --- diff --git a/lib/connect.c b/lib/connect.c index bfc22992c..6ed9b024a 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -1008,7 +1008,7 @@ static CURLcode singleipconnect(struct connectdata *conn, curl_socket_t *sockp) { struct Curl_sockaddr_ex addr; - int rc; + int rc = -1; int error = 0; bool isconnected = FALSE; struct SessionHandle *data = conn->data;