From b557e9f989598460eb950cb3942a79f805a2a5bb Mon Sep 17 00:00:00 2001 From: Vladimir Chtchetkine Date: Thu, 22 Mar 2012 15:38:08 -0700 Subject: Get rid of compiler warnings. Compiler throws warnings that 'dhport/dlport' may be used uninitialized, which creates a lot of noise when compiling the emulator. The way the variables are used and initialized makes it completely safe to ignore these warnings. Change-Id: I87c9930c73bb8d54a86e826ca23b32010fbc046f --- vl-android.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vl-android.c') diff --git a/vl-android.c b/vl-android.c index 1ec910b..4c742e7 100644 --- a/vl-android.c +++ b/vl-android.c @@ -2381,7 +2381,7 @@ net_slirp_forward(const char *optarg) char *dst_net, *dst_mask, *dst_port; char *redirect_ip, *redirect_port; uint32_t dnet, dmask, rip; - unsigned short dlport, dhport, rport; + unsigned short dlport = 0, dhport = 0, rport; dst_net = strtok(p, ":"); @@ -2447,7 +2447,7 @@ slirp_allow(const char *optarg, u_int8_t proto) char *argument = strdup(optarg), *p = argument; char *dst_ip_str, *dst_port_str; uint32_t dst_ip; - unsigned short dst_lport, dst_hport; + unsigned short dst_lport = 0, dst_hport = 0; dst_ip_str = strtok(p, ":"); dst_port_str = strtok(NULL, ":"); -- cgit v1.1