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

compiler warnings under gnu99

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.2.1
    • Affects Version/s: 1.2-rc0, 1.2.0
    • Component/s: None
    • None

      clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -Iyajl -Ibson -Imongoc -include apple.h -include mlfeatures.h -I/opt/csw/include -DBSON_COMPILATION -DMONGOC_COMPILATION  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include   -Wall -pedantic -Wno-deprecated-declarations -fPIC  -Wall -mtune=core2 -g -O2  -c cursor.c -o cursor.o
      cursor.c:72:25: warning: passing 'const char *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
            if(str) bson_free(str);
                              ^~~
      bson/bson-memory.h:60:36: note: passing argument to parameter 'mem' here
      void  bson_free           (void   *mem);
      

      and

      clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -Iyajl -Ibson -Imongoc -include apple.h -include mlfeatures.h -I/opt/csw/include -DBSON_COMPILATION -DMONGOC_COMPILATION  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include   -Wall -pedantic -Wno-deprecated-declarations -fPIC  -Wall -mtune=core2 -g -O2  -c mongoc/mongoc-async-cmd.c -o mongoc/mongoc-async-cmd.o
      mongoc/mongoc-async-cmd.c:286:32: warning: arithmetic on a pointer to void is a GNU extension [-Wpointer-arith]
               acmd->iovec->iov_base += bytes;
               ~~~~~~~~~~~~~~~~~~~~~ ^
      

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

              Created:
              Updated:
              Resolved: