diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 91aad36b4..14437fc08 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -78,9 +78,6 @@ std::string Preprocessor::read(std::istream &istr, const std::string &filename, // need space.. #if( => #if ( bool needSpace = false; - // For the error report - int lineno = 1; - // handling // when this is encountered the will be "skipped". // on the next , extra newlines will be added @@ -89,9 +86,6 @@ std::string Preprocessor::read(std::istream &istr, const std::string &filename, std::ostringstream code; for (unsigned char ch = readChar(istr); istr.good(); ch = readChar(istr)) { - if (ch == '\n') - ++lineno; - // Replace assorted special chars with spaces.. if (((ch & 0x80) == 0) && (ch != '\n') && (std::isspace(ch) || std::iscntrl(ch))) ch = ' '; diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 8cda60d05..ea293cbd6 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -633,7 +633,6 @@ void Tokenizer::simplifyTypedef() int offset = 1; bool functionPtr = false; bool functionRef = false; - bool hasTemplate = false; if (Token::Match(tok->next(), "::") || Token::Match(tok->next(), "%type%")) @@ -664,7 +663,6 @@ void Tokenizer::simplifyTypedef() { int level = 1; int paren = 0; - hasTemplate = true; typeEnd = tok->tokAt(offset + 1); for (; typeEnd ; typeEnd = typeEnd->next()) {