Fixed (for real) the preprocessor.cpp(1166) warning in #2123.

This commit is contained in:
Edoardo Prezioso 2012-07-06 13:17:08 +02:00
parent 7122aeff58
commit 3c4ce7b43a
6 changed files with 7 additions and 7 deletions

View File

@ -237,7 +237,7 @@ void CppCheckExecutor::reportOut(const std::string &outmsg)
std::cout << outmsg << std::endl; std::cout << outmsg << std::endl;
} }
void CppCheckExecutor::reportProgress(const std::string &filename, const char stage[], const unsigned int value) void CppCheckExecutor::reportProgress(const std::string &filename, const char stage[], const size_t value)
{ {
(void)filename; (void)filename;
@ -256,7 +256,7 @@ void CppCheckExecutor::reportProgress(const std::string &filename, const char st
std::ostringstream ostr; std::ostringstream ostr;
ostr << "progress: " ostr << "progress: "
<< stage << stage
<< ' ' << int(value) << '%'; << ' ' << value << '%';
if (_settings->_verbose) if (_settings->_verbose)
ostr << " time=" << str.substr(11, 8); ostr << " time=" << str.substr(11, 8);

View File

@ -70,7 +70,7 @@ public:
/** xml output of errors */ /** xml output of errors */
virtual void reportErr(const ErrorLogger::ErrorMessage &msg); virtual void reportErr(const ErrorLogger::ErrorMessage &msg);
void reportProgress(const std::string &filename, const char stage[], const unsigned int value); void reportProgress(const std::string &filename, const char stage[], const size_t value);
/** /**
* Output information messages. * Output information messages.

View File

@ -506,7 +506,7 @@ void CppCheck::reportOut(const std::string &outmsg)
_errorLogger.reportOut(outmsg); _errorLogger.reportOut(outmsg);
} }
void CppCheck::reportProgress(const std::string &filename, const char stage[], const unsigned int value) void CppCheck::reportProgress(const std::string &filename, const char stage[], const size_t value)
{ {
_errorLogger.reportProgress(filename, stage, value); _errorLogger.reportProgress(filename, stage, value);
} }

View File

@ -173,7 +173,7 @@ private:
std::string _fileContent; std::string _fileContent;
std::set<std::string> _dependencies; std::set<std::string> _dependencies;
void reportProgress(const std::string &filename, const char stage[], const unsigned int value); void reportProgress(const std::string &filename, const char stage[], const size_t value);
/** /**
* Output information messages. * Output information messages.

View File

@ -276,7 +276,7 @@ public:
* @param stage for example preprocess / tokenize / simplify / check * @param stage for example preprocess / tokenize / simplify / check
* @param value progress value (0-100) * @param value progress value (0-100)
*/ */
virtual void reportProgress(const std::string &filename, const char stage[], const unsigned int value) { virtual void reportProgress(const std::string &filename, const char stage[], const size_t value) {
(void)filename; (void)filename;
(void)stage; (void)stage;
(void)value; (void)value;

View File

@ -1160,7 +1160,7 @@ std::list<std::string> Preprocessor::getcfgs(const std::string &filedata, const
} }
// Remove defined constants from ifdef configurations.. // Remove defined constants from ifdef configurations..
unsigned int count = 0; size_t count = 0;
for (std::list<std::string>::iterator it = ret.begin(); it != ret.end(); ++it) { for (std::list<std::string>::iterator it = ret.begin(); it != ret.end(); ++it) {
if (_errorLogger) if (_errorLogger)
_errorLogger->reportProgress(filename, "Preprocessing (get configurations 2)", (100 * count++) / ret.size()); _errorLogger->reportProgress(filename, "Preprocessing (get configurations 2)", (100 * count++) / ret.size());