aboutsummaryrefslogtreecommitdiffstats
path: root/vl-android.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2012-03-22 15:38:08 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2012-03-22 15:38:08 -0700
commitb557e9f989598460eb950cb3942a79f805a2a5bb (patch)
tree42c2de22cb9531ff875bf3db5b9c633610c5e400 /vl-android.c
parent11c29fbcb16ef22a469a6014039888e0980b186e (diff)
downloadexternal_qemu-b557e9f989598460eb950cb3942a79f805a2a5bb.zip
external_qemu-b557e9f989598460eb950cb3942a79f805a2a5bb.tar.gz
external_qemu-b557e9f989598460eb950cb3942a79f805a2a5bb.tar.bz2
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
Diffstat (limited to 'vl-android.c')
-rw-r--r--vl-android.c4
1 files changed, 2 insertions, 2 deletions
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, ":");