From 34d29d52b0e6ac7ad33cbda3d6e9dfe246e1c610 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 31 Aug 2009 16:29:34 +0200 Subject: Fix compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Blue Swirl --- slirp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'slirp.c') diff --git a/slirp.c b/slirp.c index c736c2d..098ecbb 100644 --- a/slirp.c +++ b/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 -- cgit v1.1