[CDRIVER-560] Need to add mongoc-client-pool-private.h in mongoc-client-pool-private.c Created: 06/Mar/15 Updated: 07/Oct/15 Resolved: 05/Apr/15 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | 1.1.2 |
| Fix Version/s: | 1.1.5 |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Jerome Lebel | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
the function mongoc_client_pool_get_size() is declared in mongoc-client-pool-private.h and its implementation in mongoc-client-pool-private.c. The issue is mongoc-client-pool-private.c doesn't include mongoc-client-pool-private.h, therefore, the compiler doesn't see the declaration of this function while compiling the implementation of this function. There is a warning on OS X. |
| Comments |
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: Merge remote-tracking branch 'upstream/master' into 1.2.0-dev
Conflicts: |
| Comment by Githook User [ 07/Apr/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: Merge remote-tracking branch 'upstream/master' into 1.2.0-dev
Conflicts: |
| Comment by Githook User [ 07/Apr/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #189 from ajdavis/
|
| Comment by Githook User [ 07/Apr/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #189 from ajdavis/
|
| Comment by Githook User [ 07/Apr/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 05/Apr/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #189 from ajdavis/
|
| Comment by Githook User [ 05/Apr/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #189 from ajdavis/
|
| Comment by Githook User [ 05/Apr/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: |
| Comment by Jerome Lebel [ 13/Mar/15 ] |
|
And the error is: /Users/jerome/Sources/MongoHub-Mac/Libraries/MongoObjCDriver/Libraries/mongo-c-driver/src/mongoc/mongoc-client-pool.c:228:1: error: no previous prototype for function 'mongoc_client_pool_get_size' [-Werror,-Wmissing-prototypes] |
| Comment by Jerome Lebel [ 11/Mar/15 ] |
|
The pull request fixes exactly the issue. The problem is if the declaration is changed in mongoc-client-pool-private.h or the implementation in mongoc-client-pool.c, there is no way for the compiler to let you know the interface don't match. That's why there is a warning saying : since the function is not static, you need to have a declaration of this function somewhere in the mongoc-client-pool.c I'm compiling the source myself with Xcode on OS X. |
| Comment by A. Jesse Jiryu Davis [ 11/Mar/15 ] |
| Comment by A. Jesse Jiryu Davis [ 11/Mar/15 ] |
|
Can you tell us how you're building the driver and what warning you see please? |