Commit 0580ac9160eec864579c03932869f72148296779
1 parent
7fa9ae1a
Fix some SLIRP warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6272 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
6 additions
and
5 deletions
slirp/main.h
| @@ -44,7 +44,7 @@ extern int towrite_max; | @@ -44,7 +44,7 @@ extern int towrite_max; | ||
| 44 | extern int ppp_exit; | 44 | extern int ppp_exit; |
| 45 | extern int tcp_keepintvl; | 45 | extern int tcp_keepintvl; |
| 46 | extern uint8_t client_ethaddr[6]; | 46 | extern uint8_t client_ethaddr[6]; |
| 47 | -extern char *slirp_special_ip; | 47 | +extern const char *slirp_special_ip; |
| 48 | extern int slirp_restrict; | 48 | extern int slirp_restrict; |
| 49 | 49 | ||
| 50 | #define PROTO_SLIP 0x1 | 50 | #define PROTO_SLIP 0x1 |
slirp/slirp.c
| @@ -22,6 +22,7 @@ | @@ -22,6 +22,7 @@ | ||
| 22 | * THE SOFTWARE. | 22 | * THE SOFTWARE. |
| 23 | */ | 23 | */ |
| 24 | #include "qemu-common.h" | 24 | #include "qemu-common.h" |
| 25 | +#include "qemu-char.h" | ||
| 25 | #include "slirp.h" | 26 | #include "slirp.h" |
| 26 | #include "hw/hw.h" | 27 | #include "hw/hw.h" |
| 27 | 28 | ||
| @@ -47,7 +48,7 @@ static struct in_addr client_ipaddr; | @@ -47,7 +48,7 @@ static struct in_addr client_ipaddr; | ||
| 47 | 48 | ||
| 48 | static const uint8_t zero_ethaddr[6] = { 0, 0, 0, 0, 0, 0 }; | 49 | static const uint8_t zero_ethaddr[6] = { 0, 0, 0, 0, 0, 0 }; |
| 49 | 50 | ||
| 50 | -char *slirp_special_ip = CTL_SPECIAL; | 51 | +const char *slirp_special_ip = CTL_SPECIAL; |
| 51 | int slirp_restrict; | 52 | int slirp_restrict; |
| 52 | int do_slowtimo; | 53 | int do_slowtimo; |
| 53 | int link_up; | 54 | int link_up; |
| @@ -809,7 +810,7 @@ void slirp_socket_recv(int addr_low_byte, int guest_port, const uint8_t *buf, | @@ -809,7 +810,7 @@ void slirp_socket_recv(int addr_low_byte, int guest_port, const uint8_t *buf, | ||
| 809 | if (!so) | 810 | if (!so) |
| 810 | return; | 811 | return; |
| 811 | 812 | ||
| 812 | - ret = soreadbuf(so, buf, size); | 813 | + ret = soreadbuf(so, (const char *)buf, size); |
| 813 | 814 | ||
| 814 | if (ret > 0) | 815 | if (ret > 0) |
| 815 | tcp_output(sototcpcb(so)); | 816 | tcp_output(sototcpcb(so)); |
| @@ -1031,7 +1032,7 @@ static int slirp_state_load(QEMUFile *f, void *opaque, int version_id) | @@ -1031,7 +1032,7 @@ static int slirp_state_load(QEMUFile *f, void *opaque, int version_id) | ||
| 1031 | if (!ex_ptr) | 1032 | if (!ex_ptr) |
| 1032 | return -EINVAL; | 1033 | return -EINVAL; |
| 1033 | 1034 | ||
| 1034 | - so->extra = ex_ptr->ex_exec; | 1035 | + so->extra = (void *)ex_ptr->ex_exec; |
| 1035 | } | 1036 | } |
| 1036 | 1037 | ||
| 1037 | return 0; | 1038 | return 0; |
slirp/tcp_subr.c
| @@ -1283,7 +1283,7 @@ tcp_ctl(so) | @@ -1283,7 +1283,7 @@ tcp_ctl(so) | ||
| 1283 | command == ex_ptr->ex_addr) { | 1283 | command == ex_ptr->ex_addr) { |
| 1284 | if (ex_ptr->ex_pty == 3) { | 1284 | if (ex_ptr->ex_pty == 3) { |
| 1285 | so->s = -1; | 1285 | so->s = -1; |
| 1286 | - so->extra = ex_ptr->ex_exec; | 1286 | + so->extra = (void *)ex_ptr->ex_exec; |
| 1287 | return 1; | 1287 | return 1; |
| 1288 | } | 1288 | } |
| 1289 | do_pty = ex_ptr->ex_pty; | 1289 | do_pty = ex_ptr->ex_pty; |