summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-11-18 12:39:43 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-11-18 12:53:32 -0200
commit8d24622f57bdb7ee4c25927d8fbf3321fadae40a (patch)
treeb26693d0d609cb3eaecd277904ba23dc913055dd
parentc3ddc8f09e6d7f7deec73d5f380f24a1cf2a3919 (diff)
efl_net: remove send()/recv() warning on windows.
windows is nasty and defines the payload to be sent or received as 'char *', which triggers a warning when we use another kind of pointer. Partially addresses D4357.
-rw-r--r--src/lib/ecore_con/ecore_con.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 2d58c988dc..14698b54ef 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -3949,7 +3949,7 @@ _efl_net_ip_connect_async_run_socks4_try(Efl_Net_Ip_Connect_Async_Data *d, const
3949 request->port = a->sin_port; 3949 request->port = a->sin_port;
3950 memcpy(request->ipv4, &a->sin_addr, 4); 3950 memcpy(request->ipv4, &a->sin_addr, 4);
3951 3951
3952 s = send(fd, request, request_len, MSG_NOSIGNAL); 3952 s = send(fd, (const char *)request, request_len, MSG_NOSIGNAL);
3953 if (s != (ssize_t)request_len) 3953 if (s != (ssize_t)request_len)
3954 { 3954 {
3955 if (s == SOCKET_ERROR) 3955 if (s == SOCKET_ERROR)
@@ -3960,7 +3960,7 @@ _efl_net_ip_connect_async_run_socks4_try(Efl_Net_Ip_Connect_Async_Data *d, const
3960 else 3960 else
3961 { 3961 {
3962 Efl_Net_Socks4_Reply reply; 3962 Efl_Net_Socks4_Reply reply;
3963 s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL); 3963 s = recv(fd, (char *)&reply, sizeof(reply), MSG_NOSIGNAL);
3964 if (s != sizeof(reply)) 3964 if (s != sizeof(reply))
3965 { 3965 {
3966 if (s == SOCKET_ERROR) 3966 if (s == SOCKET_ERROR)
@@ -4170,7 +4170,7 @@ _efl_net_ip_connect_async_run_socks4a(Efl_Net_Ip_Connect_Async_Data *d, const ch
4170 request->ipv4[2] = 0; 4170 request->ipv4[2] = 0;
4171 request->ipv4[3] = 255; 4171 request->ipv4[3] = 255;
4172 4172
4173 s = send(fd, request, request_len, MSG_NOSIGNAL); 4173 s = send(fd, (const char *)request, request_len, MSG_NOSIGNAL);
4174 if (s != (ssize_t)request_len) 4174 if (s != (ssize_t)request_len)
4175 { 4175 {
4176 if (s == SOCKET_ERROR) 4176 if (s == SOCKET_ERROR)
@@ -4181,7 +4181,7 @@ _efl_net_ip_connect_async_run_socks4a(Efl_Net_Ip_Connect_Async_Data *d, const ch
4181 else 4181 else
4182 { 4182 {
4183 Efl_Net_Socks4_Reply reply; 4183 Efl_Net_Socks4_Reply reply;
4184 s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL); 4184 s = recv(fd, (char *)&reply, sizeof(reply), MSG_NOSIGNAL);
4185 if (s != sizeof(reply)) 4185 if (s != sizeof(reply))
4186 { 4186 {
4187 if (s == SOCKET_ERROR) 4187 if (s == SOCKET_ERROR)
@@ -4412,7 +4412,7 @@ _efl_net_ip_connect_async_run_socks5_auth_user_pass(SOCKET fd, const char *user,
4412 { 4412 {
4413 uint8_t reply[2]; 4413 uint8_t reply[2];
4414 4414
4415 s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL); 4415 s = recv(fd, (char *)&reply, sizeof(reply), MSG_NOSIGNAL);
4416 if (s != (ssize_t)sizeof(reply)) 4416 if (s != (ssize_t)sizeof(reply))
4417 { 4417 {
4418 if (s == SOCKET_ERROR) 4418 if (s == SOCKET_ERROR)
@@ -4468,7 +4468,7 @@ _efl_net_ip_connect_async_run_socks5_try(Efl_Net_Ip_Connect_Async_Data *d, const
4468 DBG("resolved address='%s' to %s. Connect using fd=" SOCKET_FMT " socks5://%s:%s", d->address, buf, fd, proxy_host, proxy_port); 4468 DBG("resolved address='%s' to %s. Connect using fd=" SOCKET_FMT " socks5://%s:%s", d->address, buf, fd, proxy_host, proxy_port);
4469 } 4469 }
4470 4470
4471 s = send(fd, &greeting, sizeof(greeting), MSG_NOSIGNAL); 4471 s = send(fd, (const char *)&greeting, sizeof(greeting), MSG_NOSIGNAL);
4472 if (s != (ssize_t)sizeof(greeting)) 4472 if (s != (ssize_t)sizeof(greeting))
4473 { 4473 {
4474 if (s == SOCKET_ERROR) 4474 if (s == SOCKET_ERROR)
@@ -4479,7 +4479,7 @@ _efl_net_ip_connect_async_run_socks5_try(Efl_Net_Ip_Connect_Async_Data *d, const
4479 else 4479 else
4480 { 4480 {
4481 Efl_Net_Socks5_Greeting_Reply greeting_reply; 4481 Efl_Net_Socks5_Greeting_Reply greeting_reply;
4482 s = recv(fd, &greeting_reply, sizeof(greeting_reply), MSG_NOSIGNAL); 4482 s = recv(fd, (char *)&greeting_reply, sizeof(greeting_reply), MSG_NOSIGNAL);
4483 if (s != sizeof(greeting_reply)) 4483 if (s != sizeof(greeting_reply))
4484 { 4484 {
4485 if (s == SOCKET_ERROR) 4485 if (s == SOCKET_ERROR)
@@ -4508,7 +4508,7 @@ _efl_net_ip_connect_async_run_socks5_try(Efl_Net_Ip_Connect_Async_Data *d, const
4508 { 4508 {
4509 EINA_THREAD_CLEANUP_PUSH(free, request); 4509 EINA_THREAD_CLEANUP_PUSH(free, request);
4510 4510
4511 s = send(fd, request, request_len, MSG_NOSIGNAL); 4511 s = send(fd, (const char *)request, request_len, MSG_NOSIGNAL);
4512 if (s != (ssize_t)request_len) 4512 if (s != (ssize_t)request_len)
4513 { 4513 {
4514 if (s == SOCKET_ERROR) 4514 if (s == SOCKET_ERROR)
@@ -4519,7 +4519,7 @@ _efl_net_ip_connect_async_run_socks5_try(Efl_Net_Ip_Connect_Async_Data *d, const
4519 else if (addrinfo->ai_family == AF_INET) 4519 else if (addrinfo->ai_family == AF_INET)
4520 { 4520 {
4521 Efl_Net_Socks5_Reply_Ipv4 reply; 4521 Efl_Net_Socks5_Reply_Ipv4 reply;
4522 s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL); 4522 s = recv(fd, (char *)&reply, sizeof(reply), MSG_NOSIGNAL);
4523 if (s != sizeof(reply)) 4523 if (s != sizeof(reply))
4524 { 4524 {
4525 if (s == SOCKET_ERROR) 4525 if (s == SOCKET_ERROR)
@@ -4545,7 +4545,7 @@ _efl_net_ip_connect_async_run_socks5_try(Efl_Net_Ip_Connect_Async_Data *d, const
4545 else if (addrinfo->ai_family == AF_INET6) 4545 else if (addrinfo->ai_family == AF_INET6)
4546 { 4546 {
4547 Efl_Net_Socks5_Reply_Ipv6 reply; 4547 Efl_Net_Socks5_Reply_Ipv6 reply;
4548 s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL); 4548 s = recv(fd, (char *)&reply, sizeof(reply), MSG_NOSIGNAL);
4549 if (s != sizeof(reply)) 4549 if (s != sizeof(reply))
4550 { 4550 {
4551 if (s == SOCKET_ERROR) 4551 if (s == SOCKET_ERROR)
@@ -4697,7 +4697,7 @@ _efl_net_ip_connect_async_run_socks5h(Efl_Net_Ip_Connect_Async_Data *d, const ch
4697 DBG("connected fd=" SOCKET_FMT " to socks5h://%s", fd, proxy); 4697 DBG("connected fd=" SOCKET_FMT " to socks5h://%s", fd, proxy);
4698 EINA_THREAD_CLEANUP_PUSH(_cleanup_close, &fd); 4698 EINA_THREAD_CLEANUP_PUSH(_cleanup_close, &fd);
4699 4699
4700 s = send(fd, &greeting, sizeof(greeting), MSG_NOSIGNAL); 4700 s = send(fd, (const char *)&greeting, sizeof(greeting), MSG_NOSIGNAL);
4701 if (s != (ssize_t)sizeof(greeting)) 4701 if (s != (ssize_t)sizeof(greeting))
4702 { 4702 {
4703 if (s == SOCKET_ERROR) 4703 if (s == SOCKET_ERROR)
@@ -4708,7 +4708,7 @@ _efl_net_ip_connect_async_run_socks5h(Efl_Net_Ip_Connect_Async_Data *d, const ch
4708 else 4708 else
4709 { 4709 {
4710 Efl_Net_Socks5_Greeting_Reply greeting_reply; 4710 Efl_Net_Socks5_Greeting_Reply greeting_reply;
4711 s = recv(fd, &greeting_reply, sizeof(greeting_reply), MSG_NOSIGNAL); 4711 s = recv(fd, (char *)&greeting_reply, sizeof(greeting_reply), MSG_NOSIGNAL);
4712 if (s != sizeof(greeting_reply)) 4712 if (s != sizeof(greeting_reply))
4713 { 4713 {
4714 if (s == SOCKET_ERROR) 4714 if (s == SOCKET_ERROR)
@@ -4773,7 +4773,7 @@ _efl_net_ip_connect_async_run_socks5h(Efl_Net_Ip_Connect_Async_Data *d, const ch
4773 { 4773 {
4774 EINA_THREAD_CLEANUP_PUSH(free, request); 4774 EINA_THREAD_CLEANUP_PUSH(free, request);
4775 4775
4776 s = send(fd, request, request_len, MSG_NOSIGNAL); 4776 s = send(fd, (const char *)request, request_len, MSG_NOSIGNAL);
4777 if (s != (ssize_t)request_len) 4777 if (s != (ssize_t)request_len)
4778 { 4778 {
4779 if (s == SOCKET_ERROR) 4779 if (s == SOCKET_ERROR)
@@ -4785,7 +4785,7 @@ _efl_net_ip_connect_async_run_socks5h(Efl_Net_Ip_Connect_Async_Data *d, const ch
4785 { 4785 {
4786 Efl_Net_Socks5_Reply reply; 4786 Efl_Net_Socks5_Reply reply;
4787 4787
4788 s = recv(fd, &reply, sizeof(reply), MSG_NOSIGNAL); 4788 s = recv(fd, (char *)&reply, sizeof(reply), MSG_NOSIGNAL);
4789 if (s != sizeof(reply)) 4789 if (s != sizeof(reply))
4790 { 4790 {
4791 if (s == SOCKET_ERROR) 4791 if (s == SOCKET_ERROR)
@@ -4801,7 +4801,7 @@ _efl_net_ip_connect_async_run_socks5h(Efl_Net_Ip_Connect_Async_Data *d, const ch
4801 { 4801 {
4802 Efl_Net_Socks5_Address_Ipv4 ipv4; 4802 Efl_Net_Socks5_Address_Ipv4 ipv4;
4803 4803
4804 s = recv(fd, &ipv4, sizeof(ipv4), MSG_NOSIGNAL); 4804 s = recv(fd, (char *)&ipv4, sizeof(ipv4), MSG_NOSIGNAL);
4805 if (s != sizeof(ipv4)) 4805 if (s != sizeof(ipv4))
4806 { 4806 {
4807 if (s == SOCKET_ERROR) 4807 if (s == SOCKET_ERROR)
@@ -4824,7 +4824,7 @@ _efl_net_ip_connect_async_run_socks5h(Efl_Net_Ip_Connect_Async_Data *d, const ch
4824 { 4824 {
4825 Efl_Net_Socks5_Address_Ipv6 ipv6; 4825 Efl_Net_Socks5_Address_Ipv6 ipv6;
4826 4826
4827 s = recv(fd, &ipv6, sizeof(ipv6), MSG_NOSIGNAL); 4827 s = recv(fd, (char *)&ipv6, sizeof(ipv6), MSG_NOSIGNAL);
4828 if (s != sizeof(ipv6)) 4828 if (s != sizeof(ipv6))
4829 { 4829 {
4830 if (s == SOCKET_ERROR) 4830 if (s == SOCKET_ERROR)