Add pseudo-keyword fallthrough to make explicit the intention of the
code and meet requirements to deviate MISRA C:2012 Rule 16.3
("An unconditional `break' statement shall terminate every
switch-clause").
No functional change.
Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
xen/common/perfc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/common/perfc.c b/xen/common/perfc.c
index 7400667bf0..80480aa776 100644
--- a/xen/common/perfc.c
+++ b/xen/common/perfc.c
@@ -134,6 +134,7 @@ void cf_check perfc_reset(unsigned char key)
case TYPE_SINGLE:
for_each_online_cpu ( cpu )
per_cpu(perfcounters, cpu)[j] = 0;
+ fallthrough;
case TYPE_S_SINGLE:
++j;
break;
@@ -141,6 +142,7 @@ void cf_check perfc_reset(unsigned char key)
for_each_online_cpu ( cpu )
memset(per_cpu(perfcounters, cpu) + j, 0,
perfc_info[i].nr_elements * sizeof(perfc_t));
+ fallthrough;
case TYPE_S_ARRAY:
j += perfc_info[i].nr_elements;
break;
--
2.34.1