[CDRIVER-4155] debug-compile-scan-build failing on macOS Created: 10/Sep/21  Updated: 28/Oct/23  Resolved: 13/Sep/21

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.19.1

Type: Task Priority: Unknown
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: failing-on-waterfall
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Example failure with relevant logs:

[2021/09/10 16:32:30.967] This warning is for project developers.  Use -Wno-dev to suppress it.
[2021/09/10 16:32:30.967] /data/mci/105aef08c32672c517655a2801526b66/mongoc/src/libbson/src/bson/bson-decimal128.c:713:7: warning: Although the value stored to 'significand_low' is used in the enclosing expression, the value is never actually read from 'significand_low' [deadcode.DeadStores]
[2021/09/10 16:32:30.967]       significand_low = 0; /* The low 17 digits of the significand */
[2021/09/10 16:32:30.967]       ^                 ~
[2021/09/10 16:32:30.967] 1 warning generated.
[2021/09/10 16:32:30.977] [  4%] Building C object src/libbson/CMakeFiles/bson_shared.dir/src/bson/bson-json.c.o
[2021/09/10 16:32:31.023] /data/mci/105aef08c32672c517655a2801526b66/mongoc/src/libbson/src/bson/bson-decimal128.c:713:7: warning: Although the value stored to 'significand_low' is used in the enclosing expression, the value is never actually read from 'significand_low' [deadcode.DeadStores]
[2021/09/10 16:32:31.023]       significand_low = 0; /* The low 17 digits of the significand */
[2021/09/10 16:32:31.023]       ^                 ~
[2021/09/10 16:32:31.023] 1 warning generated.
 
...
 
[2021/09/10 16:33:28.236] /data/mci/105aef08c32672c517655a2801526b66/mongoc/src/libmongoc/tests/mock_server/mock-rs.c:371:20: warning: Although the value stored to 'hosts_str' is used in the enclosing expression, the value is never actually read from 'hosts_str' [deadcode.DeadStores]
[2021/09/10 16:33:28.236]    rs->hosts_str = hosts_str = hosts (&rs->servers);
[2021/09/10 16:33:28.236]                    ^           ~~~~~~~~~~~~~~~~~~~~
[2021/09/10 16:33:28.236] 1 warning generated.
 
...
[2021/09/10 16:33:40.823] /data/mci/105aef08c32672c517655a2801526b66/mongoc/src/libmongoc/tests/test-mongoc-rpc.c:511:12: warning: Although the value stored to 'b' is used in the enclosing expression, the value is never actually read from 'b' [deadcode.DeadStores]
[2021/09/10 16:33:40.823]    while ((b = bson_reader_read (reader, &eof))) {
[2021/09/10 16:33:40.823]            ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2021/09/10 16:33:40.823] 1 warning generated.
 
...
 
[2021/09/10 16:33:51.686] scan-build: Analysis run complete.
[2021/09/10 16:33:51.686] scan-build: 4 bugs found.
[2021/09/10 16:33:51.686] scan-build: Run 'scan-view /data/mci/105aef08c32672c517655a2801526b66/mongoc/scan/2021-09-10-093222-26925-1' to examine bug reports.
[2021/09/10 16:33:51.688] Command failed: command encountered problem: error waiting on process '965f10d3-a30b-41e6-b38b-7093bcfcef56': exit status 1
[2021/09/10 16:33:51.688] Task completed - FAILURE.

This appears to be due to the hosts having upgraded the installed version of clang from clang 8 to clang 12.



 Comments   
Comment by Githook User [ 13/Sep/21 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-4155 address deadStore warnings (#866)
Branch: r1.19
https://github.com/mongodb/mongo-c-driver/commit/df701e8d520b1c7667320dc62ea3d4385369ddc7

Comment by Githook User [ 13/Sep/21 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-4155 address deadStore warnings (#866)
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e92c6b0e217be4b953856a10c4ef1f043e58975c

Generated at Wed Feb 07 21:20:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.