Skip to content

Commit ea8de15

Browse files
committed
test code cleanups
1 parent c0a2d46 commit ea8de15

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

tests/test-bulk.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,10 +2079,6 @@ test_bulk_edge_case_372 (bool ordered)
20792079
mongoc_bulk_operation_replace_one (bulk, selector, update, true);
20802080
}
20812081

2082-
2083-
#if 0
2084-
printf ("%s\n", bson_as_json (&reply, NULL));
2085-
#endif
20862082
ASSERT_OR_PRINT (mongoc_bulk_operation_execute (bulk, &reply, &error),
20872083
error);
20882084

@@ -2135,7 +2131,7 @@ test_bulk_new (void)
21352131
mongoc_client_t *client;
21362132
bson_error_t error;
21372133
bson_t empty = BSON_INITIALIZER;
2138-
bool r;
2134+
uint32_t r;
21392135

21402136
client = test_framework_client_new ();
21412137
assert (client);

tests/test-mongoc-collection.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,8 @@ BEGIN_IGNORE_DEPRECATIONS;
15571557

15581558
END_IGNORE_DEPRECATIONS;
15591559

1560-
cursor = mongoc_collection_find (collection, MONGOC_QUERY_NONE, 0, 0, 6000, &query, NULL, NULL);
1560+
cursor = mongoc_collection_find (collection, MONGOC_QUERY_NONE, 0, 0, 6000,
1561+
&query, NULL, NULL);
15611562
assert (cursor);
15621563
bson_destroy (&query);
15631564

@@ -1602,7 +1603,8 @@ test_command_fq (void)
16021603

16031604
cmd = BCON_NEW ("query", "{", "}");
16041605

1605-
cursor = mongoc_collection_command (collection, MONGOC_QUERY_NONE, 0, 1, 0, cmd, NULL, NULL);
1606+
cursor = mongoc_collection_command (collection, MONGOC_QUERY_NONE, 0, 1, 0,
1607+
cmd, NULL, NULL);
16061608
r = mongoc_cursor_next (cursor, &doc);
16071609
assert (r);
16081610

tests/test-mongoc-database.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ test_get_collection_info (void)
264264

265265
assert (1 == num_infos);
266266

267-
num_infos = 0;
268267
mongoc_cursor_destroy (cursor);
269268

270269
ASSERT_OR_PRINT (mongoc_database_drop (database, &error),

tests/test-mongoc-gridfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ test_write (void)
362362
r = mongoc_gridfs_file_seek (file, 0, SEEK_SET);
363363
assert (!r);
364364

365-
r = mongoc_gridfs_file_tell (file);
365+
r = (ssize_t) mongoc_gridfs_file_tell (file);
366366
assert (r == 0);
367367

368368
r = mongoc_gridfs_file_readv (file, &riov, 1, len, 0);

0 commit comments

Comments
 (0)