Reviewed-by: Kostiantyn Kostiuk <[email protected]> On Mon, Sep 7, 2026 at 1:50 PM Marc-André Lureau < [email protected]> wrote:
> We use -ftrivial-auto-var-init=zero, but static analyzers don't.. > > Signed-off-by: Marc-André Lureau <[email protected]> > --- > qga/vss-win32/install.cpp | 2 +- > qga/vss-win32/requester.cpp | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp > index f89658d277e9..12b045e2074f 100644 > --- a/qga/vss-win32/install.cpp > +++ b/qga/vss-win32/install.cpp > @@ -61,7 +61,7 @@ static void errmsg(DWORD err, const char *text) > > static void errmsg_dialog(DWORD err, const char *text, const char *opt = > "") > { > - char *msg, buf[512]; > + char *msg = NULL, buf[512] = ""; > > FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | > FORMAT_MESSAGE_FROM_SYSTEM | > FORMAT_MESSAGE_IGNORE_INSERTS, > diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp > index 493ecd57172a..52176d751274 100644 > --- a/qga/vss-win32/requester.cpp > +++ b/qga/vss-win32/requester.cpp > @@ -170,7 +170,7 @@ static void AddComponents(ErrorSet *errset) > unsigned int cComponents, c1, c2, j; > COMPointer<IVssExamineWriterMetadata> pMetadata; > COMPointer<IVssWMComponent> pComponent; > - PVSSCOMPONENTINFO info; > + PVSSCOMPONENTINFO info = NULL; > HRESULT hr; > > hr = vss_ctx.pVssbc->GetWriterMetadataCount(&cWriters); > > -- > 2.55.0.543.g5ebe2ebe4ea8 > >
