提交 9e3a95ef 编写于 作者: S Stefan Weil 提交者: Blue Swirl

Fix compiler warnings

Starting with commit df7a86ed,
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: NStefan Weil <weil@mail.berlios.de>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 528e93a9
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册