All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Silence passing arg x of `xxxx' from incompatible pointer type warnings on Windows
@ 2009-05-04 21:50 Consul
  2009-05-06 11:43 ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Consul @ 2009-05-04 21:50 UTC (permalink / raw)
  To: qemu-devel

Silence "passing arg x of `xxxx' from incompatible pointer type" warnings on Windows.

Signed-off-by: Alex Ivanov <void@aleksoft.net>
---
  migration-tcp.c |    2 +-
  nbd.c           |    2 +-
  slirp/misc.c    |    2 +-
  slirp/slirp.c   |    2 +-
  slirp/socket.c  |    2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/migration-tcp.c b/migration-tcp.c
index d9c4c98..fcd4d5f 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -58,7 +58,7 @@ static void tcp_wait_for_connect(void *opaque)

      dprintf("connect completed\n");
      do {
-        ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, &val, &valsize);
+        ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, (void*) &val, &valsize);
      } while (ret == -1 && (s->get_error(s)) == EINTR);

      if (ret < 0) {
diff --git a/nbd.c b/nbd.c
index 1586ea7..6659eef 100644
--- a/nbd.c
+++ b/nbd.c
@@ -169,7 +169,7 @@ int tcp_socket_incoming(const char *address, uint16_t port)
      memcpy(&addr.sin_addr.s_addr, &in, sizeof(in));

      opt = 1;
-    if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1) {
+    if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (void*) &opt, sizeof(opt)) == -1) {
          goto error;
      }

diff --git a/slirp/misc.c b/slirp/misc.c
index 0137e75..7420725 100644
--- a/slirp/misc.c
+++ b/slirp/misc.c
@@ -799,7 +799,7 @@ fd_block(int fd)
  #ifdef FIONBIO
         int opt = 0;

-       ioctlsocket(fd, FIONBIO, &opt);
+       ioctlsocket(fd, FIONBIO, (void*) &opt);
  #else
         int opt;

diff --git a/slirp/slirp.c b/slirp/slirp.c
index 4ca35b2..4b744f8 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -468,7 +468,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds)
                             /* Connected */
                             so->so_state &= ~SS_ISFCONNECTING;

-                           ret = send(so->s, &ret, 0, 0);
+                           ret = send(so->s, (void*) &ret, 0, 0);
                             if (ret < 0) {
                               /* XXXXX Must fix, zero bytes is a NOP */
                               if (errno == EAGAIN || errno == EWOULDBLOCK ||
diff --git a/slirp/socket.c b/slirp/socket.c
index 098132a..a5313e5 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -485,7 +485,7 @@ sorecvfrom(struct socket *so)
            */
           len = M_FREEROOM(m);
           /* if (so->so_fport != htons(53)) { */
-         ioctlsocket(so->s, FIONREAD, &n);
+         ioctlsocket(so->s, FIONREAD, (void*) &n);

           if (n > len) {
             n = (m->m_data - m->m_dat) + m->m_len + n + 1;
-- 
1.6.2.2.1669.g7eaf8

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Silence passing arg x of `xxxx' from incompatible pointer type warnings on Windows
  2009-05-04 21:50 [Qemu-devel] Silence passing arg x of `xxxx' from incompatible pointer type warnings on Windows Consul
@ 2009-05-06 11:43 ` Johannes Schindelin
  2009-05-06 18:55   ` [Qemu-devel] " Consul
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2009-05-06 11:43 UTC (permalink / raw)
  To: Consul; +Cc: qemu-devel

Hi,

On Mon, 4 May 2009, Consul wrote:

> Silence "passing arg x of `xxxx' from incompatible pointer type" 
> warnings on Windows.

Umm, I think you need to be a bit more specific which compiler you are 
using.  For example, I imagine that this issue just goes away if you use 
TDM-GCC 4.4.0-2.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] Re: Silence passing arg x of `xxxx' from incompatible pointer type warnings on Windows
  2009-05-06 11:43 ` Johannes Schindelin
@ 2009-05-06 18:55   ` Consul
  2009-05-06 20:27     ` Consul
  0 siblings, 1 reply; 4+ messages in thread
From: Consul @ 2009-05-06 18:55 UTC (permalink / raw)
  To: qemu-devel

Johannes Schindelin wrote:
> Hi,
> 
> On Mon, 4 May 2009, Consul wrote:
> 
>> Silence "passing arg x of `xxxx' from incompatible pointer type" 
>> warnings on Windows.
> 
> Umm, I think you need to be a bit more specific which compiler you are 
> using.  For example, I imagine that this issue just goes away if you use 
> TDM-GCC 4.4.0-2.
> 
> Ciao,
> Dscho
> 
> 
> 
gcc.exe (GCC) 3.4.2 (mingw-special)

I have not tried TDM-GCC 4.4.0. Does it have these types of warnings fixed?
There is a lot of those produced by 4.3.3-tdm-1 mingw32

block.c:1254: warning: format '%I64d' expects type 'int', but argument 4 has type 'int64_t'

Thanks,
Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] Re: Silence passing arg x of `xxxx' from incompatible pointer type warnings on Windows
  2009-05-06 18:55   ` [Qemu-devel] " Consul
@ 2009-05-06 20:27     ` Consul
  0 siblings, 0 replies; 4+ messages in thread
From: Consul @ 2009-05-06 20:27 UTC (permalink / raw)
  To: qemu-devel

Consul wrote:
> Johannes Schindelin wrote:
>> Hi,
>>
>> On Mon, 4 May 2009, Consul wrote:
>>
>>> Silence "passing arg x of `xxxx' from incompatible pointer type" 
>>> warnings on Windows.
>>
>> Umm, I think you need to be a bit more specific which compiler you are 
>> using.  For example, I imagine that this issue just goes away if you 
>> use TDM-GCC 4.4.0-2.
>>

Well, gcc 4.4.0 even more noisy in this context. My patch shuts it up as well.
On Linux it expects void* anyway, probably on other *nix variants as well,
so the cast is justified, isn't it?

migration-tcp.c: In function 'tcp_wait_for_connect':
migration-tcp.c:61: warning: passing argument 4 of 'getsockopt' from incompatible pointer type
/mingw/lib/gcc/mingw32/../../../include/winsock2.h:543: note: expected 'char *' but argument is of type 'int *'

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-06 20:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-04 21:50 [Qemu-devel] Silence passing arg x of `xxxx' from incompatible pointer type warnings on Windows Consul
2009-05-06 11:43 ` Johannes Schindelin
2009-05-06 18:55   ` [Qemu-devel] " Consul
2009-05-06 20:27     ` Consul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.