Fix compiler warning

gcc warning:
lib/checkclass.cpp: In member function ‘void CheckClass::checkConst()’:
lib/checkclass.cpp:1197: warning: declaration of ‘name’ shadows a member of 'this'

Rename local variable 'name' to 's'.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2012-04-04 20:12:14 +02:00 committed by PKEuS
parent d6cfbc6483
commit 37b98c2a56
1 changed files with 2 additions and 2 deletions

View File

@ -1194,8 +1194,8 @@ void CheckClass::checkConst()
if (temp->str() != "const")
continue;
} else if (func->isOperator && Token::Match(func->tokenDef->previous(), ";|{|}|public:|private:|protected:")) { // Operator without return type: conversion operator
const std::string& name = func->token->str();
if (name.compare(8, 5, "const") != 0 && name[name.size()-1] == '&')
const std::string& opName = func->token->str();
if (opName.compare(8, 5, "const") != 0 && opName[opName.size()-1] == '&')
continue;
} else {
// don't warn for unknown types..