[Groonga-commit] groonga/groonga [master] [win][mingw] suppress warnings.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 4月 29日 (金) 13:03:24 JST


Kouhei Sutou	2011-04-29 04:03:24 +0000 (Fri, 29 Apr 2011)

  New Revision: f9e2548f89e610bc4d4c37fb1b8f6ff6b94549b4

  Log:
    [win][mingw] suppress warnings.

  Modified files:
    lib/com.c

  Modified: lib/com.c (+6 -4)
===================================================================
--- lib/com.c    2011-04-29 03:44:38 +0000 (1189b94)
+++ lib/com.c    2011-04-29 04:03:24 +0000 (7a0d2b7)
@@ -686,13 +686,15 @@ grn_com_send(grn_ctx *ctx, grn_com *cs,
   if (size) {
 #ifdef WIN32
     WSABUF wsabufs[2];
-    wsabufs[0].buf = header;
+    DWORD n_sent;
+    wsabufs[0].buf = (char *)header;
     wsabufs[0].len = sizeof(grn_com_header);
-    wsabufs[1].buf = body;
+    wsabufs[1].buf = (char *)body;
     wsabufs[1].len = size;
-    if (WSASend(cs->fd, wsabufs, 2, &ret, 0, NULL, NULL) == SOCKET_ERROR) {
+    if (WSASend(cs->fd, wsabufs, 2, &n_sent, 0, NULL, NULL) == SOCKET_ERROR) {
       SERR("WSASend");
     }
+    ret = n_sent;
 #else /* WIN32 */
     struct iovec msg_iov[2];
     struct msghdr msg;
@@ -712,7 +714,7 @@ grn_com_send(grn_ctx *ctx, grn_com *cs,
     }
 #endif /* WIN32 */
   } else {
-    if ((ret = send(cs->fd, header, whole_size, MSG_NOSIGNAL|flags)) == -1) {
+    if ((ret = send(cs->fd, (const void *)header, whole_size, MSG_NOSIGNAL|flags)) == -1) {
       SERR("send");
     }
   }




Groonga-commit メーリングリストの案内
Back to archive index