diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-02-05 19:08:17 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-02-05 19:08:17 (GMT) |
commit | 774ea08686e6fddd13dd905bee0b81c8833975da (patch) | |
tree | a437525a536345f17e44c516accffe173409666f | |
parent | 0e61eb42b00ccd3f02095af16fcd28ba0788bb31 (diff) | |
download | Doxygen-774ea08686e6fddd13dd905bee0b81c8833975da.zip Doxygen-774ea08686e6fddd13dd905bee0b81c8833975da.tar.gz Doxygen-774ea08686e6fddd13dd905bee0b81c8833975da.tar.bz2 |
Fixed a couple of issues found by running Coverity
-rw-r--r-- | src/context.cpp | 6 | ||||
-rw-r--r-- | src/docparser.cpp | 3 | ||||
-rw-r--r-- | src/dotgroupcollaboration.cpp | 1 | ||||
-rw-r--r-- | src/vhdldocgen.cpp | 5 |
4 files changed, 9 insertions, 6 deletions
diff --git a/src/context.cpp b/src/context.cpp index 572e0d3..d2cfa9e 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -4046,11 +4046,11 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> s_inst.addProperty("nameWithContextFor", &Private::nameWithContextFor); init=TRUE; } - if (md && !md->cookie()) { md->setCookie(new MemberContext::Private::Cachable(md)); } + if (!md->cookie()) { md->setCookie(new MemberContext::Private::Cachable(md)); } Cachable &cache = getCache(); cache.propertyAttrs.reset(TemplateList::alloc()); - if (md && md->isProperty()) + if (md->isProperty()) { if (md->isGettable()) cache.propertyAttrs->append("get"); if (md->isPrivateGettable()) cache.propertyAttrs->append("private get"); @@ -4060,7 +4060,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> if (md->isProtectedSettable()) cache.propertyAttrs->append("protected set"); } cache.eventAttrs.reset(TemplateList::alloc()); - if (md && md->isEvent()) + if (md->isEvent()) { if (md->isAddable()) cache.eventAttrs->append("add"); if (md->isRemovable()) cache.eventAttrs->append("remove"); diff --git a/src/docparser.cpp b/src/docparser.cpp index a179904..5e68c52 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -829,6 +829,7 @@ inline void errorHandleDefaultToken(DocNode *parent,int tok, { case TK_COMMAND_AT: cmd_start = "@"; + // fall through case TK_COMMAND_BS: children.push_back(std::make_unique<DocWord>(parent,TK_COMMAND_CHAR(tok) + g_token->name)); warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Illegal command %s as part of a %s", @@ -1519,7 +1520,7 @@ reparsetoken: { QCString scope; doctokenizerYYsetStateSetScope(); - doctokenizerYYlex(); + (void)doctokenizerYYlex(); scope = g_token->name; g_context = scope; //printf("Found scope='%s'\n",scope.data()); diff --git a/src/dotgroupcollaboration.cpp b/src/dotgroupcollaboration.cpp index 3a14577..1dc1380 100644 --- a/src/dotgroupcollaboration.cpp +++ b/src/dotgroupcollaboration.cpp @@ -288,6 +288,7 @@ void DotGroupCollaboration::Edge::write( FTextStream &t ) const { if (first) first=FALSE; else t << "\\n"; t << DotNode::convertLabel(link.label); + count++; } if (count==maxLabels) t << "\\n..."; t << "\""; diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index ce1224f..299ae26 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -3046,8 +3046,9 @@ void FlowChart::colTextNodes() const FlowChart &ftemp = flowList[j+1]; if (ftemp.type & EMPTY) { - flowList.insert(flowList.begin()+j+1,FlowChart(TEXT_NO,"empty ",0)); - flowList[j+1].stamp = flo.stamp; + FlowChart fc(TEXT_NO,"empty ",0); + fc.stamp = flo.stamp; + flowList.insert(flowList.begin()+j+1,fc); } } } |