[CDRIVER-1901] Coverity analysis defect 100005: Structurally dead code Created: 02/Nov/16  Updated: 07/Nov/16  Resolved: 07/Nov/16

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Code block is unreachable because of the syntactic structure of the code

Defect 100005 (STATIC_C)
Checker UNREACHABLE (subcategory none)
File: /src/mongoc/mongoc-handshake.c
Function _get_os_type
/src/mongoc/mongoc-handshake.c, line: 121
This code cannot be reached: "return bson_strndup("unknow...".

       return bson_strndup ("unknown", HANDSHAKE_OS_TYPE_MAX);



 Comments   
Comment by Githook User [ 07/Nov/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1901 Structurally dead code
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/c5b95c7a5b88791f31b22061c1858c7c4b047980

Comment by Hannes Magnusson [ 02/Nov/16 ]

No. It is indeed dead code.

Comment by A. Jesse Jiryu Davis [ 02/Nov/16 ]

Coverity issue with #ifdef's

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