On 13/10/2021 16:38, Jan Beulich wrote: > Coverity apparently takes issue with the assignment inside an if(), but > then only in two of the cases (sh_destroy_l2_shadow() and > sh_unhook_32b_mappings()). As it's pretty simple to break out of the > outer loop without the need for a local helper variable, adjust the code > that way. > > While there, with the other "unused value" reports also in mind, further > drop a dead assignment from SHADOW_FOREACH_L1E(). > > Coverity-ID: 1492857 > Signed-off-by: Jan Beulich <[email protected]> > --- > Looking over other SHADOW_FOREACH_L<N>E() invocations wrt their uses of > "done", I find the audit ones particularly odd: The respective variables > get set only from AUDIT_FAIL() and AUDIT_FAIL_MIN(), but in both cases > after invoking BUG(), i.e. in an unreachable position.
Sounds like there is dead code we can drop. This logic is all horrible. I think this is an improvement, so Acked-by: Andrew Cooper <[email protected]>
