Skip to content

Commit

Permalink
gcc 9.x: control reaches end of non-void function:
Browse files Browse the repository at this point in the history
On modern systems this causes core dump!
  • Loading branch information
timurhai committed Jan 27, 2020
1 parent e77ad43 commit 4385c23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions afanasy/src/server/branchsrv.cpp
Expand Up @@ -70,18 +70,18 @@ BranchSrv::BranchSrv(const std::string & i_store_dir):
delete [] data;
}

bool BranchSrv::setParent(BranchSrv * i_parent)
void BranchSrv::setParent(BranchSrv * i_parent)
{
if (NULL != m_parent)
{
AF_ERR << "BranchSrv::setParent: Branch['" << m_name << "'] already has a parent.";
return false;
return;
}

if (m_name == "/")
{
AF_ERR << "BranchSrv::setParent: Root branch should not have any parent.";
return false;
return;
}

m_parent = i_parent;
Expand Down
2 changes: 1 addition & 1 deletion afanasy/src/server/branchsrv.h
Expand Up @@ -40,7 +40,7 @@ class BranchSrv : public af::Branch, public AfNodeSolve

~BranchSrv();

bool setParent(BranchSrv * i_parent);
void setParent(BranchSrv * i_parent);

bool initialize();

Expand Down

0 comments on commit 4385c23

Please sign in to comment.