TS-5009 CID 1022011 Logically dead code removal#1152
Conversation
|
[approve ci] |
|
Linux build failed! See https://ci.trafficserver.apache.org/job/Github-Linux/1004/ for details. |
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1111/ for details. |
|
@ngara I think this is failing because of clang-format. I recommend you copy the pre-commit githook into your .git/hooks tree. |
|
I put the plugin hook in and got it working. Thanks for the suggestion. Nathan
|
|
[approve ci] |
|
I took a close look at this and I didn't make the change that caused clang-format to fail here |
|
Linux build failed! See https://ci.trafficserver.apache.org/job/Github-Linux/1008/ for details. |
|
OK, figured it out. removing a variable made the equals signs want to line up differently on a line i didnt modify. Fixed! |
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1114/ for details. |
|
Maybe this should be an ink_abort instead of ink_release_assert? |
zwoop
left a comment
There was a problem hiding this comment.
This seems reasonable to me, I will commit unless someone else disagrees.
Please review - I changed this code to ink_release_assert instead of the following code, which seems to either return '\0' or *b->start(); but will ink_assert in debug mode.
ink_assert(!"out of range");
const: At condition !!b, the value of b must be equal to 0.
null: At condition !!b, the value of b must be NULL.
dead_error_condition: The condition !!b cannot be true.
700 if (unlikely(b)) {
CID 1022011 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: return b->start();.
701 return *b->start();
702 }