summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-06-17 01:22:41 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2013-06-17 01:22:41 +0200
commit70a75cd41e250a29ef30d4f35dd40630c14b8d8f (patch)
treeb4c4b523e1962827e823f4360b30f36254da88e4 /src
parentdc50f27d5260fcb4568be3d43b7dcc898355e748 (diff)
downloadnode-70a75cd41e250a29ef30d4f35dd40630c14b8d8f.tar.gz
cares: fix uninitialized variable warning
Suppress the following warning: ../../src/cares_wrap.cc: In function ‘v8::Handle<v8::Value> node::cares_wrap::SetServers(const v8::Arguments&)’: ../../src/cares_wrap.cc:1017:5: warning: ‘uv_ret.uv_err_s::code’ may be used uninitialized in this function [-Wuninitialized]
Diffstat (limited to 'src')
-rw-r--r--src/cares_wrap.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc
index ae4d17419..6b83ecb51 100644
--- a/src/cares_wrap.cc
+++ b/src/cares_wrap.cc
@@ -1012,6 +1012,9 @@ static Handle<Value> SetServers(const Arguments& args) {
cur->family = AF_INET6;
uv_ret = uv_inet_pton(AF_INET6, *ip, &cur->addr);
break;
+ default:
+ assert(0 && "Bad address family.");
+ abort();
}
if (uv_ret.code != UV_OK)