This code triggers a false positive:
const size_t window_size = 3; Filter<double, window_size> filter; template <typename T, std::size_t WindowSize> requires(WindowSize % 2 != 0) class Filter : public IFilter<T> { Filter() { // reserve memory in container. samples_.resize(WindowSize); } }
Cppcheck states:
someTest.cpp:65:18: style: Variable 'window_size' is assigned a value that is never used. [unreadVariable] const size_t window_size = 3; // Odd number ^
Probably an instance of https://trac.cppcheck.net/ticket/10233
Log in to post a comment.
This code triggers a false positive:
Cppcheck states:
Probably an instance of https://trac.cppcheck.net/ticket/10233