Skip to content

Commit e92c6b0

Browse files
authored
CDRIVER-4155 address deadStore warnings (#866)
1 parent 4835c38 commit e92c6b0

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/libbson/src/bson/bson-decimal128.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,6 @@ bson_decimal128_from_string_w_len (const char *string, /* IN */
709709
}
710710

711711
/* Encode significand */
712-
significand_high = 0, /* The high 17 digits of the significand */
713-
significand_low = 0; /* The low 17 digits of the significand */
714712

715713
if (significant_digits == 0) { /* read a zero */
716714
significand_high = 0;

src/libmongoc/tests/mock_server/mock-rs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ mock_rs_run (mock_rs_t *rs)
321321
{
322322
int i;
323323
mock_server_t *server;
324-
char *hosts_str;
325324
char *hello;
326325

327326
if (rs->has_primary) {
@@ -368,7 +367,7 @@ mock_rs_run (mock_rs_t *rs)
368367

369368

370369
/* now we know all servers' ports and we have them in one array */
371-
rs->hosts_str = hosts_str = hosts (&rs->servers);
370+
rs->hosts_str = hosts (&rs->servers);
372371
rs->uri = make_uri (&rs->servers);
373372

374373
BSON_ASSERT (rs->max_wire_version > 0);

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ test_mongoc_rpc_reply_scatter2 (void)
481481
bson_reader_t *reader;
482482
uint8_t *data;
483483
mongoc_rpc_t rpc;
484-
const bson_t *b;
485484
bool r;
486485
bool eof = false;
487486
bson_t empty;
@@ -508,7 +507,7 @@ test_mongoc_rpc_reply_scatter2 (void)
508507
ASSERT (rpc.reply.documents_len == 16200);
509508
reader =
510509
bson_reader_new_from_data (rpc.reply.documents, rpc.reply.documents_len);
511-
while ((b = bson_reader_read (reader, &eof))) {
510+
while (bson_reader_read (reader, &eof)) {
512511
count++;
513512
}
514513
ASSERT (eof == true);

0 commit comments

Comments
 (0)