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

Re: [XEN PATCH v3 07/12] x86/hvm: address violations of MISRA C Rule 16.3



On 01/07/24 10:47, Jan Beulich wrote:
On 26.06.2024 11:28, Federico Serafini wrote:
@@ -2798,11 +2800,12 @@ void hvm_emulate_one_vm_event(enum emul_kind kind, 
unsigned int trapnr,
          hvio->mmio_insn_bytes = sizeof(hvio->mmio_insn);
          memcpy(hvio->mmio_insn, curr->arch.vm_event->emul.insn.data,
                 hvio->mmio_insn_bytes);
+        fallthrough;
      }
-    /* Fall-through */
      default:

Can you clarify for me please whether this arrangement actually helps?
I'm pretty sure it'll result in a Coverity complaint, as my understanding
is that for them the marker (comment or pseudo-keyword) has to immediately
precede the subsequent label. IOW even if you confirmed that Eclair is
smarter in this regard, it may still need converting to

         hvio->mmio_insn_bytes = sizeof(hvio->mmio_insn);
         memcpy(hvio->mmio_insn, curr->arch.vm_event->emul.insn.data,
                hvio->mmio_insn_bytes);
     }
         fallthrough;
     default:


Yes, this is ok for ECLAIR.

--
Federico Serafini, M.Sc.

Software Engineer, BUGSENG (http://bugseng.com)



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.