[Groonga-commit] groonga/groonga at 63d7922 [master] windows: suppress a warning

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Tue Oct 28 17:31:27 JST 2014


Kouhei Sutou	2014-10-28 17:31:27 +0900 (Tue, 28 Oct 2014)

  New Revision: 63d79222b4e45b5272bcdcde3ff560d4e89ab70d
  https://github.com/groonga/groonga/commit/63d79222b4e45b5272bcdcde3ff560d4e89ab70d

  Message:
    windows: suppress a warning
    
        com.c: In function 'grn_com_copen':
        com.c:960:16: warning: passing argument 4 of 'setsockopt' from incompatible pointer type
             } else if (setsockopt(fd, 6, TCP_NODELAY, &value, sizeof(value))) {
                        ^
        In file included from groonga_in.h:103:0,
                         from com.c:18:
        /usr/share/mingw-w64/include/winsock2.h:999:34: note: expected 'const char *' but argument is of type 'const int *'
           WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
                                          ^

  Modified files:
    lib/com.c

  Modified: lib/com.c (+1 -1)
===================================================================
--- lib/com.c    2014-10-28 17:29:55 +0900 (8e4cd63)
+++ lib/com.c    2014-10-28 17:31:27 +0900 (6b33e55)
@@ -957,7 +957,7 @@ grn_com_copen(grn_ctx *ctx, grn_com_event *ev, const char *dest, int port)
                 addrinfo_ptr->ai_protocol);
     if (fd == -1) {
       SERR("socket");
-    } else if (setsockopt(fd, 6, TCP_NODELAY, &value, sizeof(value))) {
+    } else if (setsockopt(fd, 6, TCP_NODELAY, (const char *)&value, sizeof(value))) {
       SERR("setsockopt");
       grn_sock_close(fd);
     } else if (connect(fd, addrinfo_ptr->ai_addr, addrinfo_ptr->ai_addrlen)) {
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る