Hi,
On 11/12/2023 10:30, Nicola Vetrini wrote:
The "return 1;" statements at the end of some cases in the switch
of function 'vgic_v3_its_mmio_write' in 'vcig-v3-its.c' cause the
unreachability of the "return 1;" statement after the switch, thus
violating MISRA C:2012 Rule 2.1:
"A project shall not contain unreachable code".
The same is true for the switch in 'arch_memory_op' from
'xen/arch/arm/mm.c'.
For both cases, I actually much prefer the "return" version in the
cases. In particular for the vGIC emulation the switch is quite large
and it would not be trivial to know what happens after the break.
IOW, I would much prefer if we remove the "return ..." outside of the
switch.
Cheers,
--
Julien Grall