From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mi7tJ-0003EY-I2 for qemu-devel@nongnu.org; Mon, 31 Aug 2009 10:29:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mi7tE-0003CL-Pt for qemu-devel@nongnu.org; Mon, 31 Aug 2009 10:29:53 -0400 Received: from [199.232.76.173] (port=38237 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi7tE-0003CH-Mr for qemu-devel@nongnu.org; Mon, 31 Aug 2009 10:29:48 -0400 Received: from mx20.gnu.org ([199.232.41.8]:20389) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mi7tE-0006YB-Cf for qemu-devel@nongnu.org; Mon, 31 Aug 2009 10:29:48 -0400 Received: from moutng.kundenserver.de ([212.227.126.177]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mi7tB-0001FS-D7 for qemu-devel@nongnu.org; Mon, 31 Aug 2009 10:29:45 -0400 From: Stefan Weil Date: Mon, 31 Aug 2009 16:29:34 +0200 Message-Id: <1251728974-7708-1-git-send-email-weil@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] Fix compiler warnings List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers Starting with commit df7a86ed735eafefbd046c8cad7134652fe3f600, mingw32 builds result in a compiler warning for dns_addr: CC slirp/slirp.o /home/stefan/src/qemu/savannah/qemu/slirp/slirp.c:50: warning: missing braces around initializer /home/stefan/src/qemu/savannah/qemu/slirp/slirp.c:50: warning: (near initialization for ‘dns_addr.S_un’) Removing the assignment fixes the warning without the need of special code for mingw32 (and also saves some bytes in the resulting binary). To fix another potential compiler warning, the missing 'static' attribute was added. The same changes were applied to dns_addr_time. Signed-off-by: Stefan Weil --- slirp/slirp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index b5335a5..691420e 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -47,8 +47,8 @@ static int do_slowtimo; static TAILQ_HEAD(slirp_instances, Slirp) slirp_instances = TAILQ_HEAD_INITIALIZER(slirp_instances); -struct in_addr dns_addr = { 0 }; -u_int dns_addr_time = 0; +static struct in_addr dns_addr; +static u_int dns_addr_time; #ifdef _WIN32 -- 1.5.6.5