On Mon, Jun 29, 2026 at 03:37:08PM +0100, Peter Maydell wrote:
> 
> Hi; Coverity complains about use of an uninitialized struct
> field in this commit (CID 1660875):
> 
> > +int mshv_get_msrs(CPUState *cpu)
> > +{
> > +    int ret = 0;
> > +    size_t n_assocs = ARRAY_SIZE(msr_env_map);
> > +    struct hv_register_assoc assocs[ARRAY_SIZE(msr_env_map)];
> 
> This array has no initializer, so the elements start out
> with no initialized fields.
> 

yeah, I see why static analysis stumbles over this. mshv_set_msrs()
is doing the same thing, I'll send a patch that initializes both arrays.

thanks,

magnus

Reply via email to