mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
mm/mm_gran: fix compile warnings
mm_gran/mm_grantable.c:187:6: error: 'r.sidx' may be used uninitialized Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
@@ -174,7 +174,10 @@ bool gran_match(const gran_t *gran, size_t posi, size_t size, bool used,
|
||||
uint32_t e; /* expected cell value */
|
||||
gatr_t r; /* range helper */
|
||||
|
||||
gran_range(gran, posi, size, &r);
|
||||
if (gran_range(gran, posi, size, &r) < 0)
|
||||
{
|
||||
memset(&r, 0, sizeof(r));
|
||||
}
|
||||
|
||||
/* check the ending cell */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user