Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2427

Windows: mingw-w64 compiler warnings

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.9.0
    • Affects Version/s: 1.9.0
    • Component/s: mingw
    • None
    • Environment:
      mingw-w64 gcc-4.9.3

      Getting these compiler warnings on mingw-w64. It still works but would be nice to fix.

      mingw-w64 4.9.3
      c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I../windows/openssl-1.0.2h/include -I. -Ijsonsl -Ibson -Imongoc -DBSON_COMPILATION -DMONGOC_COMPILATION -DMONGOC_HAVE_SASL_CLIENT_DONE -D__USE_MINGW_ANSI_STDIO      -Wno-unused-value -Wno-unused-variable -Wno-unused-but-set-variable -Wno-implicit-function-declaration -Wno-format   -O2 -Wall  -std=gnu99 -mtune=generic -c mongoc/mongoc-sspi.c -o mongoc/mongoc-sspi.o
      mongoc/mongoc-sspi.c: In function '_mongoc_sspi_auth_sspi_client_unwrap':
      mongoc/mongoc-sspi.c:363:59: warning: passing argument 4 of 'DecryptMessage' from incompatible pointer type
          status = DecryptMessage (&state->ctx, &wrapBufDesc, 0, &state->qop);
                                                                 ^
      In file included from mongoc/mongoc-sspi-private.h:34:0,
                       from mongoc/mongoc-sspi.c:29:
      C:/Rtools/mingw_64/x86_64-w64-mingw32/include/sspi.h:721:26: note: expected 'long unsigned int *' but argument is of type 'int *'
         SECURITY_STATUS WINAPI DecryptMessage(PCtxtHandle phContext,PSecBufferDesc pMessage,unsigned __LONG32 MessageSeqNo,unsigned __LONG32 *pfQOP);
                                ^
      c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I../windows/openssl-1.0.2h/include -I. -Ijsonsl -Ibson -Imongoc -DBSON_COMPILATION -DMONGOC_COMPILATION -DMONGOC_HAVE_SASL_CLIENT_DONE -D__USE_MINGW_ANSI_STDIO      -Wno-unused-value -Wno-unused-variable -Wno-unused-but-set-variable -Wno-implicit-function-declaration -Wno-format   -O2 -Wall  -std=gnu99 -mtune=generic -c mongoc/mongoc-cluster-sspi.c -o mongoc/mongoc-cluster-sspi.o
      mongoc/mongoc-cluster-sspi.c: In function '_mongoc_cluster_auth_node_sspi':
      mongoc/mongoc-cluster-sspi.c:172:59: warning: pointer targets in passing argument 2 of '_mongoc_sspi_auth_sspi_client_step' differ in signedness [-Wpointer-sign]
                res = _mongoc_sspi_auth_sspi_client_step (state, buf);
                                                                 ^
      In file included from mongoc/mongoc-cluster-sspi.c:24:0:
      mongoc/mongoc-sspi-private.h:70:1: note: expected 'SEC_CHAR *' but argument is of type 'uint8_t *'
       _mongoc_sspi_auth_sspi_client_step (mongoc_sspi_client_state_t *state,
       ^
      mongoc/mongoc-cluster-sspi.c:178:61: warning: pointer targets in passing argument 2 of '_mongoc_sspi_auth_sspi_client_unwrap' differ in signedness [-Wpointer-sign]
                res = _mongoc_sspi_auth_sspi_client_unwrap (state, buf);
                                                                   ^
      In file included from mongoc/mongoc-cluster-sspi.c:24:0:
      mongoc/mongoc-sspi-private.h:74:1: note: expected 'SEC_CHAR *' but argument is of type 'uint8_t *'
       _mongoc_sspi_auth_sspi_client_unwrap (mongoc_sspi_client_state_t *state,
       ^
      mongoc/mongoc-cluster-sspi.c:181:30: warning: passing argument 3 of '_mongoc_sspi_auth_sspi_client_wrap' discards 'const' qualifier from pointer target type
                   state, response, tmp_creds, tmp_creds_len, 0);
                                    ^
      In file included from mongoc/mongoc-cluster-sspi.c:24:0:
      mongoc/mongoc-sspi-private.h:78:1: note: expected 'SEC_CHAR *' but argument is of type 'const char *'
       _mongoc_sspi_auth_sspi_client_wrap (mongoc_sspi_client_state_t *state,
       ^
      mongoc/mongoc-cluster-sspi.c:250:14: warning: assignment discards 'const' qualifier from pointer target type
             tmpstr = bson_iter_utf8 (&iter, &buflen);
                    ^
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            Jeroenooms Jeroen Ooms [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: