|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] domain: try to address Coverity pointing out a missing "break" in domain_teardown()
On 01.09.2021 10:45, Jan Beulich wrote:
> Commit 806448806264 ("xen/domain: Fix label position in
> domain_teardown()" has caused Coverity to report a _new_ supposedly
> un-annotated fall-through in a switch(). I find this (once again)
> puzzling; I'm having an increasingly hard time figuring what patterns
> the tool is actually after. I would have expected that the tool would
> either have spotted an issue also before this change, or not at all. Yet
> if it had spotted one before, the statistics report should have included
> an eliminated instance alongside the new one (because then the issue
> would simply have moved by a few lines).
>
> Hence the only thing I could guess is that the treatment of comments in
> macro expansions might be subtly different. Therefore try whether
> switching the comments to the still relatively new "fallthrough" pseudo
> keyword actually helps.
>
> Coverity-ID: 1490865
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> If this doesn't help, I'm afraid I'm lost as to what Coverity means us
> to do to silence the reporting.
According to the most recent report this did not help. Shall I
revert the change? Or do we consider it a step towards using the
pseudo keyword more uniformly?
Jan
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -401,13 +401,13 @@ static int domain_teardown(struct domain
> */
> #define PROGRESS(x) \
> d->teardown.val = PROG_ ## x; \
> - /* Fallthrough */ \
> + fallthrough; \
> case PROG_ ## x
>
> #define PROGRESS_VCPU(x) \
> d->teardown.val = PROG_vcpu_ ## x; \
> d->teardown.vcpu = v; \
> - /* Fallthrough */ \
> + fallthrough; \
> case PROG_vcpu_ ## x: \
> v = d->teardown.vcpu
>
>
>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |