[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] domain: try to address Coverity pointing out a missing "break" in domain_teardown()

  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 1 Sep 2021 10:45:48 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QwTgqcw3zlA2T/dEROtSixpo30ORvGtc6P2RdjY0Gjg=; b=GW7w5QtN03F9yx6157WuZMzBZSZlC8Z3lySQ3EIjkeG6X4zVF/dT8OSnAHZN05If8O+3Hpc0gw3unDYZ/tVqzMZhC3OxjdV+nUc1zbD+YrzPDzOlhCmaQEJ4mowLHVwJa2REVwZ7/Rq55SGEBY1hcSBX/hkMv7si49Uo/oRbjaJrmXAE989DMXZAPW4sddwjy505S5YLVDbopCkkrzOMHHiGUMDtwtRZ6Tf3UT3GsTbncweUogGbAHkn+12L6qWXyjKOTCEeallF2/+NmL4kZst7Ahc8A/d1xFP+ALqunECcGzvMdkFgaRQSLP2BQ9jbbob2/2iL9tA6Wc895tFsqQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ggASe3nILsQkMY9u+7NaaCb+8aZEHa5QFf3rlrn7kH32vM90qDD0Y6p+2j1IJAc7IiwdfRmRInYqgRMJuPMzxba5/caNkQp3YuNQjpLsKLDPJ1rfN3VxrewYZ+21esPSoGLiK6Sbpy8YtgRw+fM2g3tsKmfPEQg1jp/c6Ni9l+iC/0w1VDrDoHmk4jSPshwcm1BvT91qfedp+PSB6OTqRtXHfUQmgrGj+C2NlDJF3/pan6IK2zxZdDUsyNrf5Ttnp9YSfDh1t2ZzxalCJMwmsHpyOtv0iZrRVR7RPaAiVj3fFuhdzDiKwew4/xnWy8xjtayd/RWREsgf4KblS26ujQ==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 01 Sep 2021 08:45:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

--- 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
servers 24x7x365 and backed by RackSpace's Fanatical Support®.