|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN PATCH 10/11] xen/sched: add ASSERT_UNREACHABLE() to address MISRA C:2012 Rule 2.1
The break statement after the return statement is definitely unreachable.
As such, an call to the ASSERT_UNREACHABLE() macro is added to signal
the intentionality of such construct.
Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
---
The break in the clause is mandated by Required Rule 16.3, which is
not yet an accepted rule for Xen, but may be in the future.
---
xen/common/sched/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index 022f548652..fcee902b4e 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -2233,6 +2233,7 @@ static bool sched_tasklet_check_cpu(unsigned int cpu)
/* fallthrough */
case TASKLET_enqueued|TASKLET_scheduled:
return true;
+ ASSERT_UNREACHABLE();
break;
case TASKLET_scheduled:
clear_bit(_TASKLET_scheduled, tasklet_work);
--
2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |