]> git.lyx.org Git - features.git/commitdiff
Fix a number of other uninitialized members.
authorRichard Heck <rgheck@lyx.org>
Sun, 12 Jun 2016 03:39:45 +0000 (23:39 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 12 Jun 2016 03:59:55 +0000 (23:59 -0400)
Fixes coverity #23392, 23394, 23397, 23403, 23414, 23424,
23448, 23477.

src/Encoding.h
src/frontends/qt4/FancyLineEdit.cpp
src/frontends/qt4/GuiCitation.cpp
src/frontends/qt4/GuiGraphics.cpp
src/frontends/qt4/GuiWorkArea.cpp
src/insets/ExternalTransforms.h
src/insets/InsetCaption.cpp
src/insets/InsetNomencl.cpp
src/mathed/InsetMathDecoration.cpp

index aac632e6dad7d812cf805dc47886f00cde87aac1..5e289ca701263e8c9e37dbfe45c1c7e139ad6afa 100644 (file)
@@ -130,8 +130,8 @@ public:
        /// Represent any of the above packages
        static int const any;
        ///
-       Encoding() : fixedwidth_(true), unsafe_(false), start_encodable_(0),
-                    package_(none), complete_(false) {}
+       Encoding() : fixedwidth_(true), unsafe_(false), forced_(0), 
+                    start_encodable_(0), package_(none), complete_(false) {}
        ///
        Encoding(std::string const & n, std::string const & l,
                 std::string const & g, std::string const & i,
index e0057daecf03d8d81bc1affc16ce49832a305cfb..1238afd26218429c5de623101308b37c82fc67eb 100644 (file)
@@ -264,7 +264,7 @@ void FancyLineEdit::setButtonFocusPolicy(Side side, Qt::FocusPolicy policy)
 // IconButton - helper class to represent a clickable icon
 
 IconButton::IconButton(QWidget *parent)
-    : QAbstractButton(parent), m_autoHide(false)
+    : QAbstractButton(parent), m_iconOpacity(0.0), m_autoHide(false)
 {
     setCursor(Qt::ArrowCursor);
     setFocusPolicy(Qt::NoFocus);
index 63b6bc6b0ca2d5f252bd66235c04e1fed983c919..028e874f66bc09c716717cd2e912a9a644081f68 100644 (file)
@@ -89,7 +89,7 @@ static vector<lyx::docstring> to_docstring_vector(QStringList const & qlist)
 
 GuiCitation::GuiCitation(GuiView & lv)
        : DialogView(lv, "citation", qt_("Citation")),
-         params_(insetCode("citation"))
+         style_(0), params_(insetCode("citation"))
 {
        setupUi(this);
 
index 2ef5c6b6f62992f177b592fa365144e7089ae0d2..7e4f9ef37bc86e56376ae0e183aa84a50ae02393 100644 (file)
@@ -110,7 +110,7 @@ static void setAutoTextCB(QCheckBox * checkBox, QLineEdit * lineEdit,
 
 
 GuiGraphics::GuiGraphics(GuiView & lv)
-       : GuiDialog(lv, "graphics", qt_("Graphics"))
+       : GuiDialog(lv, "graphics", qt_("Graphics")), bbChanged(false)
 {
        setupUi(this);
        
index 4f63d16cc0f9fb61ea8175c8082cc314e8e8781f..185c2f53082bde99db758f126ebba87f7f2191ee 100644 (file)
@@ -1825,6 +1825,7 @@ void TabWorkArea::closeTab(int index)
 class DisplayPath {
 public:
        /// make vector happy
+       // coverity[UNINIT_CTOR]
        DisplayPath() {}
        ///
        DisplayPath(int tab, FileName const & filename)
index 8e531f31d8258902a3dc0b723c9fde612ccad73b..1d819001a55fadd027eff7f79a47808a4538a282 100644 (file)
@@ -334,7 +334,7 @@ typedef boost::function<TransformCommand::ptr_type(RotationData)>
 class TransformStore
 {
 public:
-       TransformStore() {}
+       TransformStore() : id(Rotate) {}
 
        /** Stores \c factory and a reminder of what \c data this \c factory
         *  operates on.
index b69d1ba71a31526b31251e74a6b3f14d55303f2d..208ad1ac38e8da2f31fa2fc7aa0dd2f0343df5e4 100644 (file)
@@ -51,7 +51,8 @@ namespace lyx {
 
 
 InsetCaption::InsetCaption(Buffer * buf, string const & type)
-    : InsetText(buf, InsetText::PlainLayout), type_(type)
+    : InsetText(buf, InsetText::PlainLayout), 
+      labelwidth_(0), is_subfloat_(false), type_(type)
 {
        setDrawFrame(true);
        setFrameColor(Color_collapsableframe);
index 7ebfe4ae2c58657953507f3e3fd0ceae65fcb991..f75ef15cd5eb6f5b612489d3d03c8c8eb171ec1a 100644 (file)
@@ -171,7 +171,7 @@ docstring InsetPrintNomencl::screenLabel() const
 
 
 struct NomenclEntry {
-       NomenclEntry() {}
+       NomenclEntry() : par(0) {}
        NomenclEntry(docstring s, docstring d, Paragraph const * p)
          : symbol(s), desc(d), par(p)
        {}
index 37ae239d108479d057a042b9a4bfafb2cbb2fed4..9e4a338eee30e174d9bb74c4ae7fae60a1bc8c69 100644 (file)
@@ -169,7 +169,7 @@ void InsetMathDecoration::infoize(odocstream & os) const
 
 namespace {
        struct Attributes {
-               Attributes() {}
+               Attributes() : over(false) {}
                Attributes(bool o, string t)
                        : over(o), tag(t) {}
                bool over;