diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-12-08 12:09:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-08 12:09:10 (GMT) |
commit | 45ccdc2925b020b086ac14ba3ab3706b6c7e16b6 (patch) | |
tree | 211b939b77c914eea991e4a619fc0ae0e8c5d3d5 | |
parent | 6d4835dbe01a27923db8a1e4559b61da5065cb7a (diff) | |
parent | 0aadb2f3e79f7aec63d8de43534916bb7358f135 (diff) | |
download | Doxygen-45ccdc2925b020b086ac14ba3ab3706b6c7e16b6.zip Doxygen-45ccdc2925b020b086ac14ba3ab3706b6c7e16b6.tar.gz Doxygen-45ccdc2925b020b086ac14ba3ab3706b6c7e16b6.tar.bz2 |
Merge pull request #7425 from albert-github/feature/bug_coverity_unint
Coverity uninitialized
-rw-r--r-- | addon/doxmlparser/src/basehandler.h | 10 | ||||
-rw-r--r-- | addon/doxmlparser/src/compoundhandler.cpp | 2 | ||||
-rw-r--r-- | addon/doxmlparser/src/compoundhandler.h | 40 | ||||
-rw-r--r-- | addon/doxmlparser/src/linkedtexthandler.cpp | 2 | ||||
-rw-r--r-- | addon/doxywizard/wizard.h | 114 | ||||
-rw-r--r-- | src/classdef.cpp | 68 | ||||
-rw-r--r-- | src/condparser.cpp | 2 | ||||
-rw-r--r-- | src/docgroup.h | 4 | ||||
-rw-r--r-- | src/docparser.h | 122 | ||||
-rw-r--r-- | src/doctokenizer.h | 14 | ||||
-rw-r--r-- | src/dotdirdeps.h | 4 | ||||
-rw-r--r-- | src/dotgraph.h | 18 | ||||
-rw-r--r-- | src/memberdef.cpp | 120 | ||||
-rw-r--r-- | src/membergroup.h | 16 | ||||
-rw-r--r-- | src/namespacedef.cpp | 28 | ||||
-rw-r--r-- | src/scanner.l | 2 | ||||
-rw-r--r-- | src/searchindex.cpp | 2 | ||||
-rw-r--r-- | src/tclscanner.l | 2 | ||||
-rw-r--r-- | src/template.cpp | 120 | ||||
-rw-r--r-- | src/vhdldocgen.h | 8 | ||||
-rw-r--r-- | src/vhdljjparser.h | 6 |
21 files changed, 352 insertions, 352 deletions
diff --git a/addon/doxmlparser/src/basehandler.h b/addon/doxmlparser/src/basehandler.h index a82114d..1772d8a 100644 --- a/addon/doxmlparser/src/basehandler.h +++ b/addon/doxmlparser/src/basehandler.h @@ -57,7 +57,7 @@ template<class T> class ElementMapper void operator()(const QXmlAttributes &attrib) { if (m_parent) (m_parent->*m_handler)(attrib); } private: - T *m_parent; + T *m_parent = 0; Handler m_handler; }; @@ -71,7 +71,7 @@ template<class T> class ElementMapper void operator()() { if (m_parent) (m_parent->*m_handler)(); } private: - T *m_parent; + T *m_parent = 0; Handler m_handler; }; @@ -277,9 +277,9 @@ template<class T> class BaseHandler : public QXmlDefaultHandler, protected: QString m_curString; QString m_skipUntil; - int m_skipCount; - QXmlDefaultHandler *m_delegateHandler; - IFallBackHandler *m_fallBackHandler; + int m_skipCount = 0; + QXmlDefaultHandler *m_delegateHandler = 0; + IFallBackHandler *m_fallBackHandler = 0; }; //----------------------------------------------------------------------------- diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp index 077c8fb..69fb70c 100644 --- a/addon/doxmlparser/src/compoundhandler.cpp +++ b/addon/doxmlparser/src/compoundhandler.cpp @@ -86,7 +86,7 @@ class CompoundIdIterator : public ICompoundIterator, { delete this; } private: - const MainHandler *m_mainHandler; + const MainHandler *m_mainHandler = 0; }; //---------------------------------------------------------------------------- diff --git a/addon/doxmlparser/src/compoundhandler.h b/addon/doxmlparser/src/compoundhandler.h index b05ba3d..6f191dc 100644 --- a/addon/doxmlparser/src/compoundhandler.h +++ b/addon/doxmlparser/src/compoundhandler.h @@ -54,10 +54,10 @@ class IncludeHandler : public IInclude, public BaseHandler<IncludeHandler> { return m_isLocal; } private: - IBaseHandler *m_parent; + IBaseHandler *m_parent = 0; StringImpl m_name; // element's content StringImpl m_refId; // refid - bool m_isLocal; // local + bool m_isLocal = false; // local }; class IncludeIterator : public BaseIterator<IIncludeIterator,IInclude,IncludeHandler> @@ -86,10 +86,10 @@ class RelatedCompound : public IRelatedCompound virtual const IString *name() const { return &m_name; } private: - CompoundHandler *m_parent; + CompoundHandler *m_parent = 0; QString m_id; // refid - Protection m_protection; // prot - Kind m_kind; // virt + Protection m_protection = Public; // prot + Kind m_kind = Normal; // virt StringImpl m_name; // element's content }; @@ -193,42 +193,42 @@ class CompoundHandler : public IClass, // XML elements: // ------------- StringImpl m_name; // compoundname - TitleHandler* m_titleHandler; // title + TitleHandler* m_titleHandler = 0; // title QList<RelatedCompound> m_subClasses; // basecompoundref QList<RelatedCompound> m_superClasses; // derivedcompoundref QList<IncludeHandler> m_includes; // includes QList<IncludeHandler> m_includedBy; // includedBy - GraphHandler* m_includeDependencyGraph; // incdepgraph - GraphHandler* m_includedByDependencyGraph; // invincdepgraph + GraphHandler* m_includeDependencyGraph = 0;// incdepgraph + GraphHandler* m_includedByDependencyGraph = 0; // invincdepgraph QList<QString> m_innerCompounds; // innerdir/innerfile/innerclass/innernamespace/innergroup TemplateParamListHandler* m_templateParamList; // templateparamlist QList<SectionHandler> m_sections; // sectiondef - DocHandler* m_brief; // briefdescription - DocHandler* m_detailed; // detaileddescription - GraphHandler* m_inheritanceGraph; // inheritancegraph - GraphHandler* m_collaborationGraph; // collaborationgraph - ProgramListingHandler* m_programListing; // programlisting + DocHandler* m_brief = 0; // briefdescription + DocHandler* m_detailed = 0; // detaileddescription + GraphHandler* m_inheritanceGraph = 0; // inheritancegraph + GraphHandler* m_collaborationGraph = 0; // collaborationgraph + ProgramListingHandler* m_programListing = 0; // programlisting // location StringImpl m_defFile; // - file - int m_defLine; // - line + int m_defLine = 0; // - line StringImpl m_defBodyFile; // - bodyfile - int m_defBodyStart; // - bodystart - int m_defBodyEnd; // - bodyend - ListOfAllMembersHandler* m_members; // listofallmember + int m_defBodyStart = 0; // - bodystart + int m_defBodyEnd = 0; // - bodyend + ListOfAllMembersHandler* m_members = 0; // listofallmember // XML attributes: // --------------- StringImpl m_id; // id - CompoundKind m_kind; // kind + CompoundKind m_kind = Invalid; // kind StringImpl m_kindString; // kind as a string StringImpl m_protection; // prot // local variables QString m_xmlDir; // directory where the info is found - int m_refCount; // object reference counter + int m_refCount = 0; // object reference counter QDict<MemberHandler> m_memberDict; // id->member lookup QDict<QList<MemberHandler> > m_memberNameDict; // name->memberlist lookup - MainHandler* m_mainHandler; // parent object + MainHandler* m_mainHandler = 0; // parent object }; void compoundhandler_init(); diff --git a/addon/doxmlparser/src/linkedtexthandler.cpp b/addon/doxmlparser/src/linkedtexthandler.cpp index b774f0f..140a48b 100644 --- a/addon/doxmlparser/src/linkedtexthandler.cpp +++ b/addon/doxmlparser/src/linkedtexthandler.cpp @@ -51,7 +51,7 @@ class LT_Ref : public LinkedTextImpl, public ILT_Ref StringImpl m_refId; StringImpl m_extId; StringImpl m_text; - TargetKind m_targetKind; + TargetKind m_targetKind = TargetKind::Member; }; LinkedTextHandler::LinkedTextHandler(IBaseHandler *parent, diff --git a/addon/doxywizard/wizard.h b/addon/doxywizard/wizard.h index 02f3f6d..810ab95 100644 --- a/addon/doxywizard/wizard.h +++ b/addon/doxywizard/wizard.h @@ -50,11 +50,11 @@ class TuneColorDialog : public QDialog void updateImage(int hue,int sat,int val); private: - QImage *m_image; - QLabel *m_imageLab; - int m_hue; - int m_sat; - int m_gam; + QImage *m_image = 0; + QLabel *m_imageLab = 0; + int m_hue = 0; + int m_sat = 0; + int m_gam = 0; }; class ColorPicker : public QWidget @@ -89,11 +89,11 @@ private: void setSat(int v); void setGam(int v); - QPixmap *m_pix; - Mode m_mode; - int m_gam; - int m_hue; - int m_sat; + QPixmap *m_pix = 0; + Mode m_mode = Hue; + int m_gam = 0; + int m_hue = 0; + int m_sat = 0; }; @@ -118,16 +118,16 @@ class Step1 : public QWidget void setRecursiveScan(int); private: - QLineEdit *m_projName; - QLineEdit *m_projBrief; - QLineEdit *m_projNumber; - QLineEdit *m_sourceDir; - QLineEdit *m_destDir; - QLabel *m_projIconLab; - QCheckBox *m_recursive; - QPushButton *m_srcSelectDir; - QPushButton *m_dstSelectDir; - Wizard *m_wizard; + QLineEdit *m_projName = 0; + QLineEdit *m_projBrief = 0; + QLineEdit *m_projNumber = 0; + QLineEdit *m_sourceDir = 0; + QLineEdit *m_destDir = 0; + QLabel *m_projIconLab = 0; + QCheckBox *m_recursive = 0; + QPushButton *m_srcSelectDir = 0; + QPushButton *m_dstSelectDir = 0; + Wizard *m_wizard = 0; const QHash<QString,Input *> &m_modelData; }; @@ -144,12 +144,12 @@ class Step2 : public QWidget void changeCrossRefState(int choice); private: - QGroupBox *m_extractMode; - QGroupBox *m_optimizeLang; - QButtonGroup *m_extractModeGroup; - QButtonGroup *m_optimizeLangGroup; - QCheckBox *m_crossRef; - Wizard *m_wizard; + QGroupBox *m_extractMode = 0; + QGroupBox *m_optimizeLang = 0; + QButtonGroup *m_extractModeGroup = 0; + QButtonGroup *m_optimizeLangGroup = 0; + QCheckBox *m_crossRef = 0; + Wizard *m_wizard = 0; const QHash<QString,Input *> &m_modelData; }; @@ -173,18 +173,18 @@ class Step3 : public QWidget void tuneColorDialog(); private: - QGroupBox *m_texOptions; - QButtonGroup *m_texOptionsGroup; - QGroupBox *m_htmlOptions; - QButtonGroup *m_htmlOptionsGroup; - QCheckBox *m_htmlEnabled; - QCheckBox *m_latexEnabled; - QCheckBox *m_manEnabled; - QCheckBox *m_rtfEnabled; - QCheckBox *m_xmlEnabled; - QCheckBox *m_searchEnabled; - QPushButton *m_tuneColor; - Wizard *m_wizard; + QGroupBox *m_texOptions = 0; + QButtonGroup *m_texOptionsGroup = 0; + QGroupBox *m_htmlOptions = 0; + QButtonGroup *m_htmlOptionsGroup = 0; + QCheckBox *m_htmlEnabled = 0; + QCheckBox *m_latexEnabled = 0; + QCheckBox *m_manEnabled = 0; + QCheckBox *m_rtfEnabled = 0; + QCheckBox *m_xmlEnabled = 0; + QCheckBox *m_searchEnabled = 0; + QPushButton *m_tuneColor = 0; + Wizard *m_wizard = 0; const QHash<QString,Input *> &m_modelData; }; @@ -207,17 +207,17 @@ class Step4 : public QWidget void setCallerGraphEnabled(int state); private: - QGroupBox *m_diagramMode; - QButtonGroup *m_diagramModeGroup; - QGroupBox *m_dotGroup; - QCheckBox *m_dotClass; - QCheckBox *m_dotCollaboration; - QCheckBox *m_dotInclude; - QCheckBox *m_dotIncludedBy; - QCheckBox *m_dotInheritance; - QCheckBox *m_dotCall; - QCheckBox *m_dotCaller; - Wizard *m_wizard; + QGroupBox *m_diagramMode = 0; + QButtonGroup *m_diagramModeGroup = 0; + QGroupBox *m_dotGroup = 0; + QCheckBox *m_dotClass = 0; + QCheckBox *m_dotCollaboration = 0; + QCheckBox *m_dotInclude = 0; + QCheckBox *m_dotIncludedBy = 0; + QCheckBox *m_dotInheritance = 0; + QCheckBox *m_dotCall = 0; + QCheckBox *m_dotCaller = 0; + Wizard *m_wizard = 0; const QHash<QString,Input *> &m_modelData; }; @@ -241,14 +241,14 @@ class Wizard : public QSplitter private: const QHash<QString,Input *> &m_modelData; - QTreeWidget *m_treeWidget; - QStackedWidget *m_topicStack; - Step1 *m_step1; - Step2 *m_step2; - Step3 *m_step3; - Step4 *m_step4; - QPushButton *m_next; - QPushButton *m_prev; + QTreeWidget *m_treeWidget = 0; + QStackedWidget *m_topicStack = 0; + Step1 *m_step1 = 0; + Step2 *m_step2 = 0; + Step3 *m_step3 = 0; + Step4 *m_step4 = 0; + QPushButton *m_next = 0; + QPushButton *m_prev = 0; }; #endif diff --git a/src/classdef.cpp b/src/classdef.cpp index fd24f0b..bba962e 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -264,7 +264,7 @@ class ClassDefImpl : public DefinitionImpl, public ClassDef // PIMPL idiom class IMPL; - IMPL *m_impl; + IMPL *m_impl = 0; }; ClassDef *createClassDef( @@ -522,7 +522,7 @@ class ClassDefAliasImpl : public DefinitionAliasImpl, public ClassDef QPtrDict<void> *visitedClasses=0) const {} private: - mutable bool m_visited; + mutable bool m_visited = false; }; @@ -560,27 +560,27 @@ class ClassDefImpl::IMPL /*! Include information about the header file should be included * in the documentation. 0 by default, set by setIncludeFile(). */ - IncludeInfo *incInfo; + IncludeInfo *incInfo = 0; /*! List of base class (or super-classes) from which this class derives * directly. */ - BaseClassList *inherits; + BaseClassList *inherits = 0; /*! List of sub-classes that directly derive from this class */ - BaseClassList *inheritedBy; + BaseClassList *inheritedBy = 0; /*! Namespace this class is part of * (this is the inner most namespace in case of nested namespaces) */ - NamespaceDef *nspace; + NamespaceDef *nspace = 0; /*! File this class is defined in */ - FileDef *fileDef; + FileDef *fileDef = 0; /*! List of all members (including inherited members) */ - MemberNameInfoSDict *allMemberNameInfoSDict; + MemberNameInfoSDict *allMemberNameInfoSDict = 0; /*! Template arguments of this class */ ArgumentList tempArgs; @@ -592,7 +592,7 @@ class ClassDefImpl::IMPL FileList files; /*! Examples that use this class */ - ExampleSDict *exampleSDict; + ExampleSDict *exampleSDict = 0; /*! Holds the kind of "class" this is. */ ClassDef::CompoundType compType; @@ -606,30 +606,30 @@ class ClassDefImpl::IMPL /*! The inner classes contained in this class. Will be 0 if there are * no inner classes. */ - ClassSDict *innerClasses; + ClassSDict *innerClasses = 0; /* classes for the collaboration diagram */ - UsesClassDict *usesImplClassDict; - UsesClassDict *usedByImplClassDict; - UsesClassDict *usesIntfClassDict; + UsesClassDict *usesImplClassDict = 0; + UsesClassDict *usedByImplClassDict = 0; + UsesClassDict *usesIntfClassDict = 0; - ConstraintClassDict *constraintClassDict; + ConstraintClassDict *constraintClassDict = 0; /*! Template instances that exists of this class, the key in the * dictionary is the template argument list. */ - mutable QDict<ClassDef> *templateInstances; + mutable QDict<ClassDef> *templateInstances = 0; /*! Template instances that exists of this class, as defined by variables. * We do NOT want to document these individually. The key in the * dictionary is the template argument list. */ - mutable QDict<ClassDef> *variableInstances; + mutable QDict<ClassDef> *variableInstances = 0; - QDict<int> *templBaseClassNames; + QDict<int> *templBaseClassNames = 0; /*! The class this class is an instance of. */ - const ClassDef *templateMaster; + const ClassDef *templateMaster = 0; /*! local class name which could be a typedef'ed alias name. */ QCString className; @@ -637,54 +637,54 @@ class ClassDefImpl::IMPL /*! If this class is a Objective-C category, then this points to the * class which is extended. */ - ClassDef *categoryOf; + ClassDef *categoryOf = 0; QList<MemberList> memberLists; /* user defined member groups */ - MemberGroupSDict *memberGroupSDict; + MemberGroupSDict *memberGroupSDict = 0; /*! Is this an abstract class? */ - bool isAbstract; + bool isAbstract = false; /*! Is the class part of an unnamed namespace? */ - bool isStatic; + bool isStatic = false; /*! TRUE if classes members are merged with those of the base classes. */ - bool membersMerged; + bool membersMerged = false; /*! TRUE if the class is defined in a source file rather than a header file. */ - bool isLocal; + bool isLocal = false; - bool isTemplArg; + bool isTemplArg = false; /*! Does this class group its user-grouped members * as a sub-section of the normal (public/protected/..) * groups? */ - bool subGrouping; + bool subGrouping = false; /** Reason of existence is a "use" relation */ - bool usedOnly; + bool usedOnly = false; /** List of titles to use for the summary */ SDict<QCString> vhdlSummaryTitles; /** Is this a simple (non-nested) C structure? */ - bool isSimple; + bool isSimple = false; /** Does this class overloaded the -> operator? */ - MemberDef *arrowOperator; + MemberDef *arrowOperator = 0; - ClassList *taggedInnerClasses; - ClassDef *tagLessRef; + ClassList *taggedInnerClasses = 0; + ClassDef *tagLessRef = 0; /** Does this class represent a Java style enum? */ - bool isJavaEnum; + bool isJavaEnum = false; - bool isGeneric; + bool isGeneric = false; - uint64 spec; + uint64 spec = 0; QCString metaData; }; diff --git a/src/condparser.cpp b/src/condparser.cpp index 74e26bc..9d7ac45 100644 --- a/src/condparser.cpp +++ b/src/condparser.cpp @@ -257,7 +257,7 @@ bool CondParser::parseLevel3() bool CondParser::parseVar() { - bool ans = 0; + bool ans = false; switch (m_tokenType) { case VARIABLE: diff --git a/src/docgroup.h b/src/docgroup.h index 47a0a3e..3ccef0d 100644 --- a/src/docgroup.h +++ b/src/docgroup.h @@ -42,9 +42,9 @@ class DocGroup private: int findExistingGroup(int &groupId,const MemberGroupInfo *info); - int m_openCount; + int m_openCount = 0; QCString m_memberGroupHeader; - int m_memberGroupId; + int m_memberGroupId = 0; QCString m_memberGroupRelates; QCString m_memberGroupDocs; std::vector<Grouping> m_autoGroupStack; diff --git a/src/docparser.h b/src/docparser.h index 02fe135..5999eae 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -173,10 +173,10 @@ class DocNode protected: /*! Sets whether or not this item is inside a preformatted section */ void setInsidePreformatted(bool p) { m_insidePre = p; } - DocNode *m_parent; + DocNode *m_parent = 0; private: - bool m_insidePre; + bool m_insidePre = false; }; /** Default accept implementation for compound nodes in the abstract @@ -294,7 +294,7 @@ class DocURL : public DocNode private: QCString m_url; - bool m_isEmail; + bool m_isEmail = false; }; /** Node representing a line break */ @@ -401,9 +401,9 @@ class DocStyleChange : public DocNode const HtmlAttribList &attribs() const { return m_attribs; } private: - uint m_position; - Style m_style; - bool m_enable; + uint m_position = 0; + Style m_style = Bold; + bool m_enable = false; HtmlAttribList m_attribs; }; @@ -488,7 +488,7 @@ class DocSymbol : public DocNode static SymType decodeSymbol(const QCString &symName); private: - SymType m_symbol; + SymType m_symbol = Sym_Unknown; }; /** Node representing a n emoji */ @@ -503,7 +503,7 @@ class DocEmoji : public DocNode private: QCString m_symName; - int m_index; + int m_index = 0; }; /** Node representing some amount of white space */ @@ -562,12 +562,12 @@ class DocVerbatim : public DocNode private: QCString m_context; QCString m_text; - Type m_type; - bool m_isExample; + Type m_type = Code; + bool m_isExample = false; QCString m_exampleFile; QCString m_relPath; QCString m_lang; - bool m_isBlock; + bool m_isBlock = false; QCString m_width; QCString m_height; QList<DocNode> m_children; @@ -610,9 +610,9 @@ class DocInclude : public DocNode QCString m_file; QCString m_context; QCString m_text; - Type m_type; - bool m_isExample; - bool m_isBlock; + Type m_type = Include; + bool m_isExample = false; + bool m_isBlock = false; QCString m_exampleFile; QCString m_blockId; }; @@ -656,15 +656,15 @@ class DocIncOperator : public DocNode void parse(); private: - Type m_type; - int m_line; - bool m_showLineNo; + Type m_type = Line; + int m_line = 0; + bool m_showLineNo = false; QCString m_text; QCString m_pattern; QCString m_context; - bool m_isFirst; - bool m_isLast; - bool m_isExample; + bool m_isFirst = false; + bool m_isLast = false; + bool m_isExample = false; QCString m_exampleFile; QCString m_includeFileName; }; @@ -686,7 +686,7 @@ class DocFormula : public DocNode QCString m_name; QCString m_text; QCString m_relPath; - int m_id; + int m_id = 0; }; /** Node representing an entry in the index. */ @@ -704,8 +704,8 @@ class DocIndexEntry : public DocNode private: QCString m_entry; - const Definition *m_scope; - const MemberDef *m_member; + const Definition *m_scope = 0; + const MemberDef *m_member = 0; }; //----------------------------------------------------------------------- @@ -722,9 +722,9 @@ class DocAutoList : public CompAccept<DocAutoList> int parse(); private: - int m_indent; - bool m_isEnumList; - int m_depth; + int m_indent = 0; + bool m_isEnumList = false; + int m_depth = 0; }; /** Node representing an item of a auto list */ @@ -737,8 +737,8 @@ class DocAutoListItem : public CompAccept<DocAutoListItem> int parse(); private: - int m_indent; - int m_itemNum; + int m_indent = 0; + int m_itemNum = 0; }; @@ -770,7 +770,7 @@ class DocXRefItem : public CompAccept<DocXRefItem> bool parse(); private: - int m_id; + int m_id = 0; QCString m_key; QCString m_file; QCString m_anchor; @@ -801,12 +801,12 @@ class DocImage : public CompAccept<DocImage> private: HtmlAttribList m_attribs; QCString m_name; - Type m_type; + Type m_type = Html; QCString m_width; QCString m_height; QCString m_relPath; QCString m_url; - bool m_inlineImage; + bool m_inlineImage = false; }; /** Node representing a dot file */ @@ -929,8 +929,8 @@ class DocRef : public CompAccept<DocRef> private: enum RefType { Unknown, Anchor, Section, Table }; - RefType m_refType; - bool m_isSubPage; + RefType m_refType = Unknown; + bool m_isSubPage = false; QCString m_file; QCString m_relPath; QCString m_ref; @@ -986,7 +986,7 @@ class DocHtmlHeader : public CompAccept<DocHtmlHeader> int parse(); private: - int m_level; + int m_level = 0; HtmlAttribList m_attribs; }; @@ -1033,7 +1033,7 @@ class DocSection : public CompAccept<DocSection> int parse(); private: - int m_level; + int m_level = 0; QCString m_id; QCString m_title; QCString m_anchor; @@ -1117,7 +1117,7 @@ class DocHtmlList : public CompAccept<DocHtmlList> int parseXml(); private: - Type m_type; + Type m_type = Unordered; HtmlAttribList m_attribs; }; @@ -1143,8 +1143,8 @@ class DocSimpleSect : public CompAccept<DocSimpleSect> bool hasTitle() const { return m_title->hasTitle(); } private: - Type m_type; - DocTitle * m_title; + Type m_type = Unknown; + DocTitle * m_title = 0; }; /** Node representing a separator between two simple sections of the @@ -1183,9 +1183,9 @@ class DocParamSect : public CompAccept<DocParamSect> bool hasTypeSpecifier() const { return m_hasTypeSpecifier; } private: - Type m_type; - bool m_hasInOutSpecifier; - bool m_hasTypeSpecifier; + Type m_type = Unknown; + bool m_hasInOutSpecifier = false; + bool m_hasTypeSpecifier = false; }; /** Node representing a paragraph in the documentation tree */ @@ -1230,8 +1230,8 @@ class DocPara : public CompAccept<DocPara> private: QCString m_sectionId; - bool m_isFirst; - bool m_isLast; + bool m_isFirst = false; + bool m_isLast = false; HtmlAttribList m_attribs; }; @@ -1271,10 +1271,10 @@ class DocParamList : public DocNode QList<DocPara> m_paragraphs; QList<DocNode> m_params; QList<DocNode> m_paramTypes; - DocParamSect::Type m_type; - DocParamSect::Direction m_dir; - bool m_isFirst; - bool m_isLast; + DocParamSect::Type m_type = DocParamSect::Unknown; + DocParamSect::Direction m_dir = DocParamSect::Unspecified; + bool m_isFirst = false; + bool m_isLast = false; }; /** Node representing a simple list item */ @@ -1294,7 +1294,7 @@ class DocSimpleListItem : public DocNode } private: - DocPara *m_paragraph; + DocPara *m_paragraph = 0; }; /** Node representing a HTML list item */ @@ -1311,7 +1311,7 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem> private: HtmlAttribList m_attribs; - int m_itemNum; + int m_itemNum = 0; }; /** Node representing a HTML description data */ @@ -1355,12 +1355,12 @@ class DocHtmlCell : public CompAccept<DocHtmlCell> private: void setRowIndex(int idx) { m_rowIdx = idx; } void setColumnIndex(int idx) { m_colIdx = idx; } - bool m_isHeading; - bool m_isFirst; - bool m_isLast; + bool m_isHeading = false; + bool m_isFirst = false; + bool m_isLast = false; HtmlAttribList m_attribs; - int m_rowIdx; - int m_colIdx; + int m_rowIdx = -1; + int m_colIdx = -1; }; /** Node representing a HTML table caption */ @@ -1377,7 +1377,7 @@ class DocHtmlCaption : public CompAccept<DocHtmlCaption> private: HtmlAttribList m_attribs; - bool m_hasCaptionId; + bool m_hasCaptionId = false; QCString m_file; QCString m_anchor; }; @@ -1414,8 +1414,8 @@ class DocHtmlRow : public CompAccept<DocHtmlRow> private: void setRowIndex(int idx) { m_rowIdx = idx; } HtmlAttribList m_attribs; - int m_visibleCells; - int m_rowIdx; + int m_visibleCells = -1; + int m_rowIdx = -1; }; /** Node representing a HTML table */ @@ -1442,9 +1442,9 @@ class DocHtmlTable : public CompAccept<DocHtmlTable> private: void computeTableGrid(); - DocHtmlCaption *m_caption; + DocHtmlCaption *m_caption = 0; HtmlAttribList m_attribs; - int m_numCols; + int m_numCols = 0; }; /** Node representing an HTML blockquote */ @@ -1483,8 +1483,8 @@ class DocRoot : public CompAccept<DocRoot> bool isEmpty() const { return m_children.isEmpty(); } private: - bool m_indent; - bool m_singleLine; + bool m_indent = false; + bool m_singleLine = false; }; diff --git a/src/doctokenizer.h b/src/doctokenizer.h index f89069c..badf23e 100644 --- a/src/doctokenizer.h +++ b/src/doctokenizer.h @@ -80,8 +80,8 @@ struct TokenInfo // comment blocks // list token info - bool isEnumList; - int indent; + bool isEnumList = false; + int indent = 0; // sections QCString sectionId; @@ -94,22 +94,22 @@ struct TokenInfo QCString verb; // xrefitem - int id; + int id = -1; // html tag HtmlAttribList attribs; - bool endTag; - bool emptyTag; + bool endTag = false; + bool emptyTag = false; // whitespace QCString chars; // url - bool isEMailAddr; + bool isEMailAddr = false; // param attributes enum ParamDir { In=1, Out=2, InOut=3, Unspecified=0 }; - ParamDir paramDir; + ParamDir paramDir = Unspecified; }; // globals diff --git a/src/dotdirdeps.h b/src/dotdirdeps.h index f5eef65..a71e8f1 100644 --- a/src/dotdirdeps.h +++ b/src/dotdirdeps.h @@ -43,9 +43,9 @@ class DotDirDeps : public DotGraph virtual QCString getImgAltText() const; private: - const DirDef *m_dir; + const DirDef *m_dir = 0; - bool m_linkRelations; + bool m_linkRelations = false; }; #endif diff --git a/src/dotgraph.h b/src/dotgraph.h index 0eda3a8..edba009 100644 --- a/src/dotgraph.h +++ b/src/dotgraph.h @@ -74,22 +74,22 @@ class DotGraph QCString relImgName() const { return m_relPath + imgName(); } // the following variables are used while writing the graph to a .dot file - GraphOutputFormat m_graphFormat; - EmbeddedOutputFormat m_textFormat; + GraphOutputFormat m_graphFormat = GOF_BITMAP; + EmbeddedOutputFormat m_textFormat = EOF_Html; QDir m_dir; QCString m_fileName; QCString m_relPath; - bool m_generateImageMap; - int m_graphId; + bool m_generateImageMap = false; + int m_graphId = 0; QCString m_absPath; QCString m_baseName; QGString m_theGraph; - bool m_regenerate; - bool m_doNotAddImageToIndex; - bool m_noDivTag; - bool m_zoomable; - bool m_urlOnly; + bool m_regenerate = false; + bool m_doNotAddImageToIndex = false; + bool m_noDivTag = false; + bool m_zoomable = true; + bool m_urlOnly = false; private: DotGraph(const DotGraph &); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 40d596c..85d1cdf 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1300,32 +1300,32 @@ class MemberDefImpl::IMPL const ArgumentList &al,const char *meta ); - ClassDef *classDef; // member of or related to - FileDef *fileDef; // member of file definition - NamespaceDef *nspace; // the namespace this member is in. + ClassDef *classDef = 0; // member of or related to + FileDef *fileDef = 0; // member of file definition + NamespaceDef *nspace = 0; // the namespace this member is in. - MemberDef *enumScope; // the enclosing scope, if this is an enum field - bool livesInsideEnum; - const MemberDef *annEnumType; // the anonymous enum that is the type of this member - MemberList *enumFields; // enumeration fields + MemberDef *enumScope = 0; // the enclosing scope, if this is an enum field + bool livesInsideEnum = false; + const MemberDef *annEnumType = 0; // the anonymous enum that is the type of this member + MemberList *enumFields = 0; // enumeration fields - MemberDef *redefines; // the members that this member redefines - MemberList *redefinedBy; // the list of members that redefine this one + MemberDef *redefines = 0; // the members that this member redefines + MemberList *redefinedBy = 0; // the list of members that redefine this one - MemberDef *memDef; // member definition for this declaration - MemberDef *memDec; // member declaration for this definition - ClassDef *relatedAlso; // points to class marked by relatedAlso + MemberDef *memDef = 0; // member definition for this declaration + MemberDef *memDec = 0; // member declaration for this definition + ClassDef *relatedAlso = 0; // points to class marked by relatedAlso - ExampleSDict *exampleSDict; // a dictionary of all examples for quick access + ExampleSDict *exampleSDict = 0; // a dictionary of all examples for quick access QCString type; // return actual type QCString accessorType; // return type that tell how to get to this member - ClassDef *accessorClass; // class that this member accesses (for anonymous types) + ClassDef *accessorClass = 0; // class that this member accesses (for anonymous types) QCString args; // function arguments/variable array specifiers QCString def; // member definition in code (fully qualified name) QCString anc; // HTML anchor name - Specifier virt; // normal/virtual/pure virtual - Protection prot; // protection type [Public/Protected/Private] + Specifier virt = Normal; // normal/virtual/pure virtual + Protection prot = Public; // protection type [Public/Protected/Private] QCString decl; // member declaration in class QCString bitfields; // struct member bitfields @@ -1335,13 +1335,13 @@ class MemberDefImpl::IMPL QCString initializer; // initializer QCString extraTypeChars; // extra type info found after the argument list QCString enumBaseType; // base type of the enum (C++11) - int initLines; // number of lines in the initializer + int initLines = 0; // number of lines in the initializer - uint64 memSpec; // The specifiers present for this member - MemberType mtype; // returns the kind of member - int maxInitLines; // when the initializer will be displayed - int userInitLines; // result of explicit \hideinitializer or \showinitializer - MemberDef *annMemb; + uint64 memSpec = 0; // The specifiers present for this member + MemberType mtype = MemberType_Define; // returns the kind of member + int maxInitLines = 0; // when the initializer will be displayed + int userInitLines = 0; // result of explicit \hideinitializer or \showinitializer + MemberDef *annMemb = 0; ArgumentList defArgList; // argument list of this member definition ArgumentList declArgList; // argument list of this member declaration @@ -1358,19 +1358,19 @@ class MemberDefImpl::IMPL // as its type then this is computed by // getClassDefOfAnonymousType() and // cached here. - SDict<MemberList> *classSectionSDict; // not accessible + SDict<MemberList> *classSectionSDict = 0; // not accessible - const MemberDef *groupAlias; // Member containing the definition - int grpId; // group id - MemberGroup *memberGroup; // group's member definition - GroupDef *group; // group in which this member is in + const MemberDef *groupAlias = 0; // Member containing the definition + int grpId = 0; // group id + MemberGroup *memberGroup = 0; // group's member definition + GroupDef *group = 0; // group in which this member is in Grouping::GroupPri_t grouppri; // priority of this definition QCString groupFileName; // file where this grouping was defined - int groupStartLine; // line " " " " " - MemberDef *groupMember; + int groupStartLine = 0; // line " " " " " + MemberDef *groupMember = 0; - bool isTypedefValCached; - const ClassDef *cachedTypedefValue; + bool isTypedefValCached = false; + const ClassDef *cachedTypedefValue = 0; QCString cachedTypedefTemplSpec; QCString cachedResolvedType; @@ -1380,41 +1380,41 @@ class MemberDefImpl::IMPL //QCString inbodyDocs; // documentation inheritance - MemberDef *docProvider; + MemberDef *docProvider = 0; // to store the output file base from tag files QCString explicitOutputFileBase; // objective-c - bool implOnly; // function found in implementation but not - // in the interface - mutable bool hasDocumentedParams; - mutable bool hasDocumentedReturnType; - bool isDMember; - Relationship related; // relationship of this to the class - bool stat; // is it a static function? - bool proto; // is it a prototype; - bool docEnumValues; // is an enum with documented enum values. - - mutable bool annScope; // member is part of an anonymous scope - mutable bool annUsed; // ugly: needs to be mutable to allow setAnonymousUsed to act as a - // const member. - bool hasCallGraph; - bool hasCallerGraph; - bool hasReferencedByRelation; - bool hasReferencesRelation; - bool explExt; // member was explicitly declared external - bool tspec; // member is a template specialization - bool groupHasDocs; // true if the entry that caused the grouping was documented - bool docsForDefinition; // TRUE => documentation block is put before - // definition. - // FALSE => block is put before declaration. - ClassDef *category; - MemberDef *categoryRelation; + bool implOnly = false; // function found in implementation but not + // in the interface + mutable bool hasDocumentedParams = false; + mutable bool hasDocumentedReturnType = false; + bool isDMember = false; + Relationship related = Member; // relationship of this to the class + bool stat = false; // is it a static function? + bool proto = false; // is it a prototype? + bool docEnumValues = false; // is an enum with documented enum values. + + mutable bool annScope = false; // member is part of an anonymous scope + mutable bool annUsed = false; // ugly: needs to be mutable to allow setAnonymousUsed to act as a + // const member. + bool hasCallGraph = false; + bool hasCallerGraph = false; + bool hasReferencedByRelation = false; + bool hasReferencesRelation = false; + bool explExt = false; // member was explicitly declared external + bool tspec = false; // member is a template specialization + bool groupHasDocs = false; // true if the entry that caused the grouping was documented + bool docsForDefinition = false; // TRUE => documentation block is put before + // definition. + // FALSE => block is put before declaration. + ClassDef *category = 0; + MemberDef *categoryRelation = 0; QCString declFileName; - int declLine; - int declColumn; - int numberOfFlowKW; + int declLine = 0; + int declColumn = 0; + int numberOfFlowKW = 0; }; MemberDefImpl::IMPL::IMPL() : diff --git a/src/membergroup.h b/src/membergroup.h index 0fda3d7..aa30063 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -89,18 +89,18 @@ class MemberGroup int docLine() const { return m_docLine; } private: - MemberList *memberList; // list of all members in the group - MemberList *inDeclSection; - int grpId; + MemberList *memberList = 0; // list of all members in the group + MemberList *inDeclSection = 0; + int grpId = 0; QCString grpHeader; QCString fileName; // base name of the generated file QCString doc; - bool inSameSection; - int m_numDecMembers; - int m_numDocMembers; - const Definition *m_parent; + bool inSameSection = 0; + int m_numDecMembers = 0; + int m_numDocMembers = 0; + const Definition *m_parent = 0; QCString m_docFile; - int m_docLine; + int m_docLine = 0; std::vector<ListItemInfo> m_xrefListItems; }; diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index fa258a0..220f300 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -124,23 +124,23 @@ class NamespaceDefImpl : public DefinitionImpl, public NamespaceDef QCString fileName; FileList files; - NamespaceSDict *usingDirList; - SDict<Definition> *usingDeclList; - SDict<Definition> *m_innerCompounds; + NamespaceSDict *usingDirList = 0; + SDict<Definition> *usingDeclList = 0; + SDict<Definition> *m_innerCompounds = 0; - MemberSDict *m_allMembersDict; + MemberSDict *m_allMembersDict = 0; QList<MemberList> m_memberLists; - MemberGroupSDict *memberGroupSDict; - ClassSDict *classSDict; - ClassSDict *interfaceSDict; - ClassSDict *structSDict; - ClassSDict *exceptionSDict; - NamespaceSDict *namespaceSDict; - bool m_subGrouping; + MemberGroupSDict *memberGroupSDict = 0; + ClassSDict *classSDict = 0; + ClassSDict *interfaceSDict = 0; + ClassSDict *structSDict = 0; + ClassSDict *exceptionSDict = 0; + NamespaceSDict *namespaceSDict = 0; + bool m_subGrouping = false; enum { NAMESPACE, MODULE, CONSTANT_GROUP, LIBRARY } m_type; - bool m_isPublished; + bool m_isPublished = false; QCString metaData; - bool m_inline; + bool m_inline = false; }; NamespaceDef *createNamespaceDef(const char *defFileName,int defLine,int defColumn, @@ -246,7 +246,7 @@ class NamespaceDefAliasImpl : public DefinitionAliasImpl, public NamespaceDef bool isVisited() const { return m_visited; } private: - bool m_visited; + bool m_visited = false; }; NamespaceDef *createNamespaceDefAlias(const Definition *newScope,const NamespaceDef *nd) diff --git a/src/scanner.l b/src/scanner.l index 912132c..0e3aeb0 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -187,7 +187,7 @@ struct scannerYY_state int column = 0; int fencedSize = 0; - bool nestedComment = 0; + bool nestedComment = false; std::vector< std::pair<Entry*,std::shared_ptr<Entry> > > outerScopeEntries; }; diff --git a/src/searchindex.cpp b/src/searchindex.cpp index 06c5c75..22d33b6 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -426,7 +426,7 @@ struct SearchIndexExternal::Private { Private() : docEntries(12251) {} SDict<SearchDocEntry> docEntries; - SearchDocEntry *current; + SearchDocEntry *current = 0; }; SearchIndexExternal::SearchIndexExternal() : SearchIndexIntf(External) diff --git a/src/tclscanner.l b/src/tclscanner.l index 49c0807..a4709ce 100644 --- a/src/tclscanner.l +++ b/src/tclscanner.l @@ -1503,7 +1503,7 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment); { tcl_inf("-> %s\n",(const char *)tcl.string_comment); int myPos=0; - bool myNew=0; + bool myNew=false; int myLine=tcl.line_comment; BufStr myI(1024); BufStr myO(1024); diff --git a/src/template.cpp b/src/template.cpp index 173df74..ca28c73 100644 --- a/src/template.cpp +++ b/src/template.cpp @@ -245,7 +245,7 @@ class TemplateStruct::Private Private() : fields(17), refCount(0) { fields.setAutoDelete(TRUE); } QDict<TemplateVariant> fields; - int refCount; + int refCount = 0; }; TemplateStruct::TemplateStruct() @@ -306,8 +306,8 @@ class TemplateList::Private public: Private() : index(-1), refCount(0) {} QValueList<TemplateVariant> elems; - int index; - int refCount; + int index = -1; + int refCount = 0; }; @@ -398,7 +398,7 @@ class TemplateListConstIterator : public TemplateListIntf::ConstIterator private: const TemplateList &m_list; QValueList<TemplateVariant>::ConstIterator m_it; - int m_index; + int m_index = 0; }; TemplateListIntf::ConstIterator *TemplateList::createIterator() const @@ -565,21 +565,21 @@ class TemplateContextImpl : public TemplateContext void addIndexEntry(const QCString &indexName,const QValueList<TemplateKeyValue> &arguments); private: - const TemplateEngine *m_engine; + const TemplateEngine *m_engine = 0; QCString m_templateName; - int m_line; + int m_line = 0; QCString m_outputDir; QList< QDict<TemplateVariant> > m_contextStack; TemplateBlockContext m_blockContext; QDict<TemplateEscapeIntf*> m_escapeIntfDict; - TemplateEscapeIntf *m_activeEscapeIntf; - TemplateSpacelessIntf *m_spacelessIntf; - bool m_spacelessEnabled; - bool m_tabbingEnabled; + TemplateEscapeIntf *m_activeEscapeIntf = 0; + TemplateSpacelessIntf *m_spacelessIntf = 0; + bool m_spacelessEnabled = false; + bool m_tabbingEnabled = false; TemplateAutoRef<TemplateStruct> m_indices; QDict< QStack<TemplateVariant> > m_indexStacks; QCString m_encoding; - void *m_fromUtf8; + void *m_fromUtf8 = 0; }; //----------------------------------------------------------------------------- @@ -1445,7 +1445,7 @@ class ExprAstNumber : public ExprAst int number() const { return m_number; } virtual TemplateVariant resolve(TemplateContext *) { return TemplateVariant(m_number); } private: - int m_number; + int m_number = 0; }; /** @brief Class representing a variable in the AST */ @@ -1497,7 +1497,7 @@ class ExprAstFunctionVariable : public ExprAst return v; } private: - ExprAst *m_var; + ExprAst *m_var = 0; QList<ExprAst> m_args; }; @@ -1526,7 +1526,7 @@ class ExprAstFilter : public ExprAst } private: QCString m_name; - ExprAst *m_arg; + ExprAst *m_arg = 0; }; /** @brief Class representing a filter applied to an expression in the AST */ @@ -1542,7 +1542,7 @@ class ExprAstFilterAppl : public ExprAst return m_filter->apply(m_expr->resolve(c),c); } private: - ExprAst *m_expr; + ExprAst *m_expr = 0; ExprAstFilter *m_filter; }; @@ -1568,7 +1568,7 @@ class ExprAstNegate : public ExprAst virtual TemplateVariant resolve(TemplateContext *c) { return TemplateVariant(!m_expr->resolve(c).toBool()); } private: - ExprAst *m_expr; + ExprAst *m_expr = 0; }; class ExprAstUnary : public ExprAst @@ -1589,8 +1589,8 @@ class ExprAstUnary : public ExprAst } } private: - Operator::Type m_operator; - ExprAst *m_exp; + Operator::Type m_operator = Operator::Or; + ExprAst *m_exp = 0; }; /** @brief Class representing a binary operator in the AST */ @@ -1696,9 +1696,9 @@ class ExprAstBinary : public ExprAst } } private: - Operator::Type m_operator; - ExprAst *m_lhs; - ExprAst *m_rhs; + Operator::Type m_operator = Operator::Or; + ExprAst *m_lhs = 0; + ExprAst *m_rhs = 0; }; //---------------------------------------------------------- @@ -1715,7 +1715,7 @@ class TemplateNode TemplateNode *parent() { return m_parent; } private: - TemplateNode *m_parent; + TemplateNode *m_parent = 0; }; //---------------------------------------------------------- @@ -1736,7 +1736,7 @@ class TemplateParser QCString templateName() const { return m_templateName; } void warn(const char *fileName,int line,const char *fmt,...) const; private: - const TemplateEngine *m_engine; + const TemplateEngine *m_engine = 0; QCString m_templateName; QList<TemplateToken> &m_tokens; }; @@ -2282,9 +2282,9 @@ class ExpressionParser return TRUE; } - const TemplateParser *m_parser; + const TemplateParser *m_parser = 0; ExprToken m_curToken; - int m_line; + int m_line = 0; const char *m_tokenStream; }; @@ -2296,9 +2296,9 @@ class TemplateToken public: enum Type { Text, Variable, Block }; TemplateToken(Type t,const char *d,int l) : type(t), data(d), line(l) {} - Type type; + Type type = Text; QCString data; - int line; + int line = 0; }; //---------------------------------------------------------- @@ -2339,7 +2339,7 @@ class TemplateImpl : public TemplateNode, public Template TemplateBlockContext *blockContext() { return &m_blockContext; } private: - TemplateEngine *m_engine; + TemplateEngine *m_engine = 0; QCString m_name; TemplateNodeList m_nodes; TemplateBlockContext m_blockContext; @@ -2358,8 +2358,8 @@ class TemplateStructWeakRef : public TemplateStructIntf virtual int addRef() { return ++m_refCount; } virtual int release() { int count=--m_refCount; if (count<=0) { delete this; } return count; } private: - TemplateStructIntf *m_ref; - int m_refCount; + TemplateStructIntf *m_ref = 0; + int m_refCount = 0; }; //---------------------------------------------------------- @@ -2789,8 +2789,8 @@ class TemplateNodeVariable : public TemplateNode private: QCString m_templateName; - int m_line; - ExprAst *m_var; + int m_line = 0; + ExprAst *m_var = 0; QList<ExprAst> m_args; }; @@ -2853,7 +2853,7 @@ template<class T> class TemplateNodeCreator : public TemplateNode } } QCString m_templateName; - int m_line; + int m_line = 0; }; //---------------------------------------------------------- @@ -2950,8 +2950,8 @@ class TemplateNodeIf : public TemplateNodeCreator<TemplateNodeIf> { GuardedNodes() : guardAst(0) {} ~GuardedNodes() { delete guardAst; } - int line; - ExprAst *guardAst; + int line = 0; + ExprAst *guardAst = 0; TemplateNodeList trueNodes; }; QList<GuardedNodes> m_ifGuardedNodes; @@ -3009,7 +3009,7 @@ class TemplateNodeRepeat : public TemplateNodeCreator<TemplateNodeRepeat> } private: TemplateNodeList m_repeatNodes; - ExprAst *m_expr; + ExprAst *m_expr = 0; }; //---------------------------------------------------------- @@ -3175,9 +3175,9 @@ class TemplateNodeRange : public TemplateNodeCreator<TemplateNodeRange> } private: - bool m_down; - ExprAst *m_startExpr; - ExprAst *m_endExpr; + bool m_down = false; + ExprAst *m_startExpr = 0; + ExprAst *m_endExpr = 0; QCString m_var; TemplateNodeList m_loopNodes; }; @@ -3332,8 +3332,8 @@ class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor> } private: - bool m_reversed; - ExprAst *m_expr; + bool m_reversed = false; + ExprAst *m_expr = 0; QValueList<QCString> m_vars; TemplateNodeList m_loopNodes; TemplateNodeList m_emptyNodes; @@ -3534,7 +3534,7 @@ class TemplateNodeExtend : public TemplateNodeCreator<TemplateNodeExtend> } private: - ExprAst *m_extendExpr; + ExprAst *m_extendExpr = 0; TemplateNodeList m_nodes; }; @@ -3591,7 +3591,7 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude> } private: - ExprAst *m_includeExpr; + ExprAst *m_includeExpr = 0; }; //---------------------------------------------------------- @@ -3724,8 +3724,8 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate> } private: - ExprAst *m_templateExpr; - ExprAst *m_fileExpr; + ExprAst *m_templateExpr = 0; + ExprAst *m_fileExpr = 0; }; //---------------------------------------------------------- @@ -3839,7 +3839,7 @@ class TemplateNodeTree : public TemplateNodeCreator<TemplateNodeTree> } private: - ExprAst *m_treeExpr; + ExprAst *m_treeExpr = 0; TemplateNodeList m_treeNodes; }; @@ -3853,7 +3853,7 @@ class TemplateNodeIndexEntry : public TemplateNodeCreator<TemplateNodeIndexEntry Mapping(const QCString &n,ExprAst *e) : name(n), value(e) {} ~Mapping() { delete value; } QCString name; - ExprAst *value; + ExprAst *value = 0; }; public: TemplateNodeIndexEntry(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data) @@ -4128,7 +4128,7 @@ class TemplateNodeCycle : public TemplateNodeCreator<TemplateNodeCycle> } } private: - uint m_index; + uint m_index = 0; QList<ExprAst> m_args; }; @@ -4142,7 +4142,7 @@ class TemplateNodeSet : public TemplateNodeCreator<TemplateNodeSet> Mapping(const QCString &n,ExprAst *e) : name(n), value(e) {} ~Mapping() { delete value; } QCString name; - ExprAst *value; + ExprAst *value = 0; }; public: TemplateNodeSet(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data) @@ -4175,7 +4175,7 @@ class TemplateNodeSet : public TemplateNodeCreator<TemplateNodeSet> } } private: - Mapping *m_mapping; + Mapping *m_mapping = 0; }; //---------------------------------------------------------- @@ -4323,8 +4323,8 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers> private: TemplateNodeList m_nodes; QCString m_var; - ExprAst *m_listExpr; - ExprAst *m_patternExpr; + ExprAst *m_listExpr = 0; + ExprAst *m_patternExpr = 0; }; //---------------------------------------------------------- @@ -4427,8 +4427,8 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource> } } private: - ExprAst *m_resExpr; - ExprAst *m_asExpr; + ExprAst *m_resExpr = 0; + ExprAst *m_asExpr = 0; }; //---------------------------------------------------------- @@ -4645,11 +4645,11 @@ class TemplateLexer const char *data,int line,int startPos,int endPos, TemplateToken::Type type); void reset(); - const TemplateEngine *m_engine; + const TemplateEngine *m_engine = 0; QCString m_fileName; QCString m_data; - char m_openChar; - char m_closeChar; + char m_openChar = 0; + char m_closeChar = 0; }; TemplateLexer::TemplateLexer(const TemplateEngine *engine,const QCString &fileName,const QCString &data) : @@ -5070,10 +5070,10 @@ class TemplateEngine::Private int line() const { return m_line; } private: - Type m_type; + Type m_type = Template; QCString m_fileName; QCString m_blockName; - int m_line; + int m_line = 0; }; public: Private(TemplateEngine *engine) : m_templateCache(17) /*, m_indent(0)*/, m_engine(engine) @@ -5185,7 +5185,7 @@ class TemplateEngine::Private private: QDict<Template> m_templateCache; //mutable int m_indent; - TemplateEngine *m_engine; + TemplateEngine *m_engine = 0; QList<IncludeEntry> m_includeStack; QCString m_extension; QCString m_templateDirName; diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h index 1d9397b..6203196 100644 --- a/src/vhdldocgen.h +++ b/src/vhdldocgen.h @@ -307,11 +307,11 @@ class FlowChart ~FlowChart(); private: - int id; - int stamp; - int type; + int id = 0; + int stamp = 0; + int type = 0; - int line; + int line = 0; QCString label; QCString text; diff --git a/src/vhdljjparser.h b/src/vhdljjparser.h index f987e4a..53eb0be 100644 --- a/src/vhdljjparser.h +++ b/src/vhdljjparser.h @@ -73,9 +73,9 @@ struct VhdlConfNode QCString arch; QCString binding; QCString compSpec; - int level; - bool isLeaf; - bool isInlineConf; + int level = 0; + bool isLeaf = false; + bool isInlineConf = false; }; |