Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update benchmark_test.c for new function interface #144

Merged
merged 2 commits into from
Jul 1, 2013
Merged

Update benchmark_test.c for new function interface #144

merged 2 commits into from
Jul 1, 2013

Conversation

newkedison
Copy link
Contributor

I have try to compile benchmark_test.c and found it was a little out of date so that cannot be compiled.
Then I make some modification on it and it work now.

When compile with gcc (V4.6.3), there were 3 warnings:

benchmark_test.c: In function ‘batch_insert_small_test’:
benchmark_test.c:189:9: warning: passing argument 3 of ‘mongo_insert_batch’ from incompatible pointer type [enabled by default]
/home/newk/repo/mongo-c-driver/src/mongo.h:471:18: note: expected ‘const struct bson *’ but argument is of type ‘struct bson *
benchmark_test.c: In function ‘batch_insert_medium_test’:
benchmark_test.c:207:9: warning: passing argument 3 of ‘mongo_insert_batch’ from incompatible pointer type [enabled by default]
/home/newk/repo/mongo-c-driver/src/mongo.h:471:18: note: expected ‘const struct bson *’ but argument is of type ‘struct bson *
benchmark_test.c: In function ‘batch_insert_large_test’:
benchmark_test.c:225:9: warning: passing argument 3 of ‘mongo_insert_batch’ from incompatible pointer type [enabled by default]
/home/newk/repo/mongo-c-driver/src/mongo.h:471:18: note: expected ‘const struct bson *’ but argument is of type ‘struct bson *

I have no idea how to deal with them, any suggestion?

@ntdavidson
Copy link

change
bson b;
to
const bson b;
in each of the three functions.

(did all this in my pull request #133 submitted the other day)

@newkedison
Copy link
Contributor Author

Thanks, ntdavidson. I have update it and sorry for making duplication. Should I close this pull request or delete it (seems there is no delete button)?

@ntdavidson
Copy link

Sorry, I didn't mean to give you the idea that you should close it.

I would just leave it, at least until whoever's in charge of the project comes along. My changes are in amongst a load of other stuff that they might not accept, so if you leave it it gives them the option to commit your changes and get it working again.

@newkedison
Copy link
Contributor Author

Thanks for you help and advice.

gjmurakami-10gen added a commit that referenced this pull request Jul 1, 2013
Update benchmark_test.c for new function interface
@gjmurakami-10gen gjmurakami-10gen merged commit 8cc3df7 into 10gen-archive:master Jul 1, 2013
@gjmurakami-10gen
Copy link
Contributor

Thanks, I'll look into adding it to the automated tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants