fix: resolve cppcheck warnings for const pointer and static functions
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
@@ -30,7 +30,7 @@ void ring_destroy(RingBuf *r) {
|
||||
r->capacity = 0;
|
||||
}
|
||||
|
||||
size_t ring_readable(const RingBuf *r) {
|
||||
static size_t ring_readable(const RingBuf *r) {
|
||||
size_t h = load_head(r);
|
||||
size_t t = load_tail(r);
|
||||
if (h >= t)
|
||||
@@ -39,7 +39,7 @@ size_t ring_readable(const RingBuf *r) {
|
||||
return r->capacity - (t - h);
|
||||
}
|
||||
|
||||
size_t ring_writeable(const RingBuf *r) {
|
||||
static size_t ring_writeable(const RingBuf *r) {
|
||||
return r->capacity - 1 - ring_readable(r);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user