Skip to content

Commit

Permalink
Fixed a couple of issues found by running Coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Feb 5, 2021
1 parent 0e61eb4 commit 774ea08
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
Expand Down
3 changes: 2 additions & 1 deletion src/docparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -1519,7 +1520,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, DocNodeList &children,bo
{
QCString scope;
doctokenizerYYsetStateSetScope();
doctokenizerYYlex();
(void)doctokenizerYYlex();
scope = g_token->name;
g_context = scope;
//printf("Found scope='%s'\n",scope.data());
Expand Down
1 change: 1 addition & 0 deletions src/dotgroupcollaboration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 << "\"";
Expand Down
5 changes: 3 additions & 2 deletions src/vhdldocgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 774ea08

Please sign in to comment.