Skip to content

Address -Wunused-parameter warnings #1671

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

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libmongoc/examples/example-bulkwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
(void) 0

int
main (int argc, char *argv[])
main (void)
{
bool ok = false;

Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/src/mongoc/mongoc-bulkwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ bool
mongoc_bulkwrite_append_insertone (mongoc_bulkwrite_t *self,
const char *ns,
const bson_t *document,
const mongoc_bulkwrite_insertoneopts_t *opts, // may be NULL
BSON_MAYBE_UNUSED const mongoc_bulkwrite_insertoneopts_t *opts, // may be NULL
bson_error_t *error)
{
BSON_ASSERT_PARAM (self);
Expand Down
2 changes: 2 additions & 0 deletions src/libmongoc/src/mongoc/mongoc-cyrus.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ sasl_verify_type_to_str (sasl_verify_type_t type)
int
_mongoc_cyrus_verifyfile_cb (void *context, const char *file, sasl_verify_type_t type)
{
BSON_UNUSED (context);

TRACE ("Attempting to load file: `%s`. Type is %s\n", file, sasl_verify_type_to_str (type));

#ifdef _WIN32
Expand Down
5 changes: 1 addition & 4 deletions src/libmongoc/tests/unified/operation.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,6 @@ operation_client_bulkwrite (test_t *test, operation_t *op, result_t *result, bso
goto done;
}

int64_t nmodels = 0;

// Parse arguments.
{
bool parse_ok = false;
Expand Down Expand Up @@ -461,7 +459,6 @@ operation_client_bulkwrite (test_t *test, operation_t *op, result_t *result, bso
BSON_ASSERT (bson_iter_init (&args_models_iter, args_models));
bw = mongoc_client_bulkwrite_new (client);
while (bson_iter_next (&args_models_iter)) {
nmodels++;
bson_t model_wrapper;
bson_iter_bson (&args_models_iter, &model_wrapper);
if (!append_client_bulkwritemodel (bw, &model_wrapper, error)) {
Expand Down Expand Up @@ -491,7 +488,7 @@ operation_client_bulkwrite (test_t *test, operation_t *op, result_t *result, bso
mongoc_bulkwrite_set_session (bw, op->session);
mongoc_bulkwritereturn_t bwr = mongoc_bulkwrite_execute (bw, opts);

result_from_bulkwritereturn (result, bwr, nmodels);
result_from_bulkwritereturn (result, bwr);
mongoc_bulkwriteexception_destroy (bwr.exc);
mongoc_bulkwriteresult_destroy (bwr.res);
ret = true;
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/tests/unified/result.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ result_check (result_t *result, entity_map_t *em, bson_val_t *expect_result, bso
}

void
result_from_bulkwritereturn (result_t *result, mongoc_bulkwritereturn_t bwr, size_t nmodels)
result_from_bulkwritereturn (result_t *result, mongoc_bulkwritereturn_t bwr)
{
// Build up the result value as a BSON document.
bson_t bwr_bson = BSON_INITIALIZER;
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/tests/unified/result.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void
result_from_bulk_write (result_t *result, const bson_t *reply, const bson_error_t *error);

void
result_from_bulkwritereturn (result_t *result, mongoc_bulkwritereturn_t bwr, size_t nmodels);
result_from_bulkwritereturn (result_t *result, mongoc_bulkwritereturn_t bwr);

void
result_from_insert_one (result_t *result, const bson_t *reply, const bson_error_t *error);
Expand Down