Skip to content

Commit 4ffee84

Browse files
committed
mitigated unusedFunction selfcheck warnings
1 parent 33d9718 commit 4ffee84

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

lib/cppcheck.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ class CPPCHECKLIB CppCheck {
111111
*/
112112
unsigned int checkBuffer(const FileWithDetails &file, const uint8_t* data, std::size_t size);
113113

114-
unsigned int checkString(const FileWithDetails &file, const std::string& data) {
115-
return checkBuffer(file, reinterpret_cast<const uint8_t*>(data.data()), data.size());
116-
}
117-
118114
/**
119115
* @brief Returns current version number as a string.
120116
* @return version, e.g. "1.38"

lib/tokenlist.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -328,18 +328,6 @@ bool TokenList::createTokensFromBuffer(const uint8_t* data, size_t size)
328328

329329
//---------------------------------------------------------------------------
330330

331-
bool TokenList::createTokensFromFileInternal(const std::string& file0)
332-
{
333-
simplecpp::OutputList outputList;
334-
simplecpp::TokenList tokens(file0, mFiles, &outputList);
335-
336-
createTokens(std::move(tokens));
337-
338-
return outputList.empty();
339-
}
340-
341-
//---------------------------------------------------------------------------
342-
343331
bool TokenList::createTokensFromBufferInternal(const uint8_t* data, size_t size, const std::string& file0)
344332
{
345333
simplecpp::OutputList outputList;

lib/tokenlist.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class CPPCHECKLIB TokenList {
104104
return createTokensFromBuffer(reinterpret_cast<const uint8_t*>(data), size);
105105
}
106106
template<size_t size>
107+
// cppcheck-suppress unusedFunction - used in tests only
107108
bool createTokensFromString(const char (&data)[size]) {
108109
return createTokensFromBuffer(reinterpret_cast<const uint8_t*>(data), size-1);
109110
}
@@ -214,7 +215,6 @@ class CPPCHECKLIB TokenList {
214215
}
215216

216217
private:
217-
bool createTokensFromFileInternal(const std::string& file0);
218218
bool createTokensFromBufferInternal(const uint8_t* data, std::size_t size, const std::string& file0);
219219

220220
/** Token list */

0 commit comments

Comments
 (0)