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:
chao.an
2021-02-27 13:39:47 +08:00
committed by chao an
parent 43742ca827
commit 3a658ee32c
+1 -1
View File
@@ -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);