Skip to content

Commit

Permalink
Silence cppcheck a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
bertmelis authored May 14, 2024
1 parent ae08adf commit 2251a7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
pip install platformio
- name: Cppcheck
run: |
pio check --fail-on-defect=medium --fail-on-defect=high --flags "--enable=warning --enable=style --enable=performance --suppress=unusedFunction --suppress=preprocessorErrorDirective" --skip-packages
pio check --fail-on-defect=medium --fail-on-defect=high --flags "--inline-suppr --enable=warning --enable=style --enable=performance --suppress=unusedFunction --suppress=preprocessorErrorDirective" --skip-packages
6 changes: 3 additions & 3 deletions src/MemoryPool/src/Fixed.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace MemoryPool {
template <std::size_t nrBlocks, std::size_t blocksize>
class Fixed {
public:
Fixed()
Fixed() // cppcheck-suppress uninitMemberVar
: _buffer{0}
, _head(_buffer) {
unsigned char* b = _head;
Expand Down Expand Up @@ -88,7 +88,7 @@ class Fixed {
std::cout << "+--------------------" << std::endl;
}

bool _isFree(unsigned char* ptr) {
bool _isFree(const unsigned char* ptr) {
unsigned char* b = _head;
while (b) {
if (b == ptr) return true;
Expand All @@ -104,4 +104,4 @@ class Fixed {
std::mutex _mutex;
};

} // end namespace MemoryPool
} // end namespace MemoryPool

0 comments on commit 2251a7a

Please sign in to comment.