diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:02:42 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:02:42 +0100 |
commit | f1a3501750afeba2b750dc2cf64b017f795e2e4e (patch) | |
tree | 94e7a97530d3598a9ce0f49944076fef92c561b5 /common | |
parent | 7ca879fb907b534a1adf557eebed0ea402e579e1 (diff) | |
download | tigervnc-f1a3501750afeba2b750dc2cf64b017f795e2e4e.tar.gz tigervnc-f1a3501750afeba2b750dc2cf64b017f795e2e4e.zip |
The compiler cannot figure out if this is assigned properly
The logic is a bit complex so we're going to have to silence the
warning with this explicit assignment.
Diffstat (limited to 'common')
-rw-r--r-- | common/network/TcpSocket.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx index 2545034c..5158e805 100644 --- a/common/network/TcpSocket.cxx +++ b/common/network/TcpSocket.cxx @@ -155,6 +155,10 @@ TcpSocket::TcpSocket(const char *host, int port) gai_strerror(result)); } + // This logic is too complex for the compiler to determine if + // sock is properly assigned or not. + sock = -1; + for (current = ai; current != NULL; current = current->ai_next) { family = current->ai_family; |