On 7/3/2022 4:32 AM, Peng Liang wrote: > On 6/15/2022 10:52 PM, Steve Sistare wrote: [...] >> diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c [...] >> +static int vfio_container_pre_save(void *opaque) >> +{ >> + VFIOContainer *container = (VFIOContainer *)opaque; >> + Error *err; > > According to the description of error_setg, local Error variables should be > initialized to NULL. The following coccinelle script from Markus should be > helpful > to auto fix the problem :) :
Thanks! I will fix this and the other instances in my code. - Steve > > @ r @ > identifier id; > @@ > ( > static Error *id; > | > Error *id > + = NULL > ; > ) > [...]