In case do_submit from libaio fails and returns -EAGAIN the
called continue breaks completely out of the loop since the
loop statement is always false. In this case there is no second
attempt as the code tries. Set the loop condition to true to
fix it.
Fix for:
CID
1297886 (#1 of 1): Structurally dead code (UNREACHABLE)
continue_in_do_while_false: A continue statement within a do-while
loop only continues execution of the loop body if the loop
continuation condition is still true. Since the condition will
never be true in a "do ... while (false);" loop the continue
statement has the same effect as a break statement. Did you
intend execution to continue at the top of the loop?
do_while_false_condition: This loop will never continue since
the condition false is never true.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
continue;
}
assert(0 == "io_submit got unexpected error");
+ } else {
+ break;
}
- } while (false);
+ } while (true);
pos += aio.len;
}
write_finish_cond.Signal();