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

Non C99 GNU extension

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.0
    • Affects Version/s: 1.8.1
    • Component/s: None
    • None

      We need pure C99 for the R bindings (no GNU extensions).

      -I/usr/local/include   -fPIC  -Wall -pedantic -c mongoc/mongoc-cluster.c -o mongoc/mongoc-cluster.o
      mongoc/mongoc-client.c:2549:4: warning: void function '_mongoc_client_push_server_session' should not return void expression [-Wpedantic]
         return _mongoc_topology_push_server_session (client->topology,
         ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      mongoc/mongoc-cluster.c:124:31: warning: arithmetic on a pointer to void is a GNU extension [-Wpointer-arith]
                    iov[n].iov_base + difference,
                    ~~~~~~~~~~~~~~~ ^
      /usr/include/secure/_string.h:62:33: note: expanded from macro 'memcpy'
                      __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
      

      To fix simply cast the pointer to a typed pointer (e.g. int*) before incrementing it.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            Jeroenooms Jeroen Ooms [X]
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: