-
Type:
Technical Debt
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Storage Engines - Foundations
-
None
-
5
204067 Structurally dead code
Actions intended to be performed by the unreachable code will never occur.
Due to WT_ERR_MSG(session, ENOTSUP, "Reserve is not currently supported for layered cursors"); , this function returns early and the later code is unreachable.
In __clayered_reserve: Code block is unreachable because of the syntactic structure of the code
static int
2063__clayered_reserve(WT_CURSOR *cursor)
2064{
2065 WT_CURSOR_LAYERED *clayered;
2066 WT_DECL_RET;
2067 WT_ITEM value;
2068 WT_SESSION_IMPL *session;
2069 bool overwrite;
2070
2071 WT_CLEAR(value);
2072 clayered = (WT_CURSOR_LAYERED *)cursor;
2073 overwrite = F_ISSET(cursor, WT_CURSTD_OVERWRITE);
2074
CID 180409:Check of thread-shared field evades lock acquisition (LOCK_EVASION) [ "select issue" ]
CID 180713:Dereference of potentially null field (NULL_FIELD) [ "select issue" ]
2075 CURSOR_UPDATE_API_CALL(cursor, session, ret, reserve, clayered->dhandle);
2076
2077 WT_ERR_MSG(session, ENOTSUP, "Reserve is not currently supported for layered cursors");
2078
2079 /*
2080 * Since a search will be performed afterward that clears the iteration flags, no point to
2081 * retain the flags.
2082 */
CID 204067: (#1 of 1): Structurally dead code (UNREACHABLE)unreachable: This code cannot be reached: (void)(clayered->flags &= 0....
2083 F_CLR(clayered, WT_CLAYERED_ITERATE_NEXT | WT_CLAYERED_ITERATE_PREV);
2084 WT_ERR(__cursor_copy_release(cursor));
2085 WT_ERR(__cursor_needkey(cursor));
2086 __cursor_novalue(cursor);
2087 WT_ERR(__wt_txn_context_check(session, true));