Commit 0580ac9160eec864579c03932869f72148296779

Authored by blueswir1
1 parent 7fa9ae1a

Fix some SLIRP warnings

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