From 70a75cd41e250a29ef30d4f35dd40630c14b8d8f Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 17 Jun 2013 01:22:41 +0200 Subject: [PATCH] cares: fix uninitialized variable warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suppress the following warning: ../../src/cares_wrap.cc: In function ‘v8::Handle 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] --- src/cares_wrap.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index ae4d174196..6b83ecb514 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -1012,6 +1012,9 @@ static Handle 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)