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

Non C99 GNU extension

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.9.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            jesse A. Jesse Jiryu Davis
            Reporter:
            Jeroenooms Jeroen Ooms [X] (Inactive)
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: