-Werror=unused-but-set-variable

Change-Id: I0b3586bb3acca4075b26790a8dfe3f97d6921feb
This commit is contained in:
Stephan Bergmann 2016-06-23 15:02:01 +02:00
parent 496cba2e8b
commit 20f58e7904

View File

@ -278,7 +278,6 @@ bool SingleValFields::VisitMemberExpr( const MemberExpr* memberExpr )
if (!functionDecl) { if (!functionDecl) {
break; break;
} }
bool bFound = false;
for (unsigned i = 0; i < callExpr->getNumArgs(); ++i) { for (unsigned i = 0; i < callExpr->getNumArgs(); ++i) {
if (i >= functionDecl->getNumParams()) // can happen in template code if (i >= functionDecl->getNumParams()) // can happen in template code
break; break;
@ -289,7 +288,6 @@ bool SingleValFields::VisitMemberExpr( const MemberExpr* memberExpr )
assignValue = "?"; assignValue = "?";
bPotentiallyAssignedTo = true; bPotentiallyAssignedTo = true;
} }
bFound = true;
break; break;
} }
} }
@ -299,7 +297,6 @@ bool SingleValFields::VisitMemberExpr( const MemberExpr* memberExpr )
{ {
const CXXConstructExpr* consExpr = dyn_cast<CXXConstructExpr>(parent); const CXXConstructExpr* consExpr = dyn_cast<CXXConstructExpr>(parent);
const CXXConstructorDecl* consDecl = consExpr->getConstructor(); const CXXConstructorDecl* consDecl = consExpr->getConstructor();
bool bFound = false;
for (unsigned i = 0; i < consExpr->getNumArgs(); ++i) { for (unsigned i = 0; i < consExpr->getNumArgs(); ++i) {
if (i >= consDecl->getNumParams()) // can happen in template code if (i >= consDecl->getNumParams()) // can happen in template code
break; break;
@ -310,7 +307,6 @@ bool SingleValFields::VisitMemberExpr( const MemberExpr* memberExpr )
assignValue = "?"; assignValue = "?";
bPotentiallyAssignedTo = true; bPotentiallyAssignedTo = true;
} }
bFound = true;
break; break;
} }
} }