Skip to content

Commit ef75b3c

Browse files
committed
Fix compiler warning (#1254)
GCC 13 warns that `pool` may be used uninitialized. This is a false positive because pool will only be used in the case that it is initialized, but by initializing it to NULL we can avoid this warning.
1 parent d223333 commit ef75b3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libmongoc/tests/test-mongoc-client.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ test_mongoc_client_speculative_auth_failure (bool pooled)
479479
char *uri_str_auth;
480480
mongoc_collection_t *collection;
481481
mongoc_client_t *auth_client;
482-
mongoc_client_pool_t *pool;
482+
mongoc_client_pool_t *pool = NULL;
483483
mongoc_uri_t *uri;
484484
mongoc_cursor_t *cursor;
485485
const bson_t *doc;

0 commit comments

Comments
 (0)