From 3e6bc3621bfe523ad858b9d60d0662158e1ed1af Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Wed, 4 May 2016 21:12:33 -0400 Subject: [PATCH] Initialize Interface factory pointer to fix Coverity warning. Coverity complains (in CID 1335150) about `Generator::parseInterface()` since the default copy-ctor for `Interface` will end up copying uninitialized memory (the unset `m_factory` member). Fixed by initializing the m_factory. REVIEW:127836 --- src/wayland/tools/generator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wayland/tools/generator.cpp b/src/wayland/tools/generator.cpp index 805d93be85..bc748d92d1 100644 --- a/src/wayland/tools/generator.cpp +++ b/src/wayland/tools/generator.cpp @@ -208,6 +208,7 @@ Interface::Interface() = default; Interface::Interface(const QXmlStreamAttributes &attributes) : m_name(attributes.value(QStringLiteral("name")).toString()) , m_version(attributes.value(QStringLiteral("version")).toUInt()) + , m_factory(Q_NULLPTR) { auto it = s_clientClassNameMapping.constFind(m_name); if (it != s_clientClassNameMapping.constEnd()) {