[CDRIVER-934] compiler warnings under gnu99 Created: 14/Oct/15  Updated: 19/Oct/16  Resolved: 14/Oct/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 1.2-rc0, 1.2.0
Fix Version/s: 1.2.1

Type: Bug Priority: Minor - P4
Reporter: Jeroen Ooms [X] Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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;
         ~~~~~~~~~~~~~~~~~~~~~ ^



 Comments   
Comment by Jeroen Ooms [X] [ 15/Oct/15 ]

edit; never mind I was mistaken

Comment by Githook User [ 14/Oct/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: Merge remote-tracking branch 'upstream/r1.2'

Comment by Githook User [ 14/Oct/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-934: compiler warnings under gnu99
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e0971c8e749b0bb5a0cc5b4b5efb952902a042f7

Comment by Githook User [ 14/Oct/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-934: compiler warnings under gnu99
Branch: r1.2
https://github.com/mongodb/mongo-c-driver/commit/e0971c8e749b0bb5a0cc5b4b5efb952902a042f7

Comment by Jeroen Ooms [X] [ 14/Oct/15 ]

Oops sorry you're right. Yes the latter is harmless though my repository maintainers strictly enforce gnu99 standards, so GNU extension are not accepted (i.e. I won't be able to package this code)

Comment by Hannes Magnusson [ 14/Oct/15 ]

The first one is in your code?

We'll fix the latter one, although fairly harmless.

Generated at Wed Feb 07 21:11:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.