mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
mm/circbuf: fix compile warning
circbuf/circbuf.c:133:14: warning: 'len' may be used uninitialized in this function [-Wmaybe-uninitialized]
133 | circ->head = len;
| ~~~~~~~~~~~^~~~~
circbuf/circbuf.c:106:10: note: 'len' was declared here
106 | size_t len;
| ^~~
Change-Id: I60e42b88e98838f5654d84b70f109a4df5a7ff26
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -103,7 +103,7 @@ int circbuf_init(FAR struct circbuf_s *circ, FAR void *base, size_t bytes)
|
||||
int circbuf_resize(FAR struct circbuf_s *circ, size_t bytes)
|
||||
{
|
||||
FAR void *tmp = NULL;
|
||||
size_t len;
|
||||
size_t len = 0;
|
||||
|
||||
DEBUGASSERT(circ);
|
||||
DEBUGASSERT(!circ->external);
|
||||
|
||||
Reference in New Issue
Block a user