anchao commented on code in PR #14575:
URL: https://github.com/apache/nuttx/pull/14575#discussion_r1823928903
##########
mm/mm_gran/mm_grantable.c:
##########
@@ -174,6 +174,7 @@ 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 */
+ memset(&r, 0, sizeof(r)); /* clear the range explicitly to avoid warnings */
gran_range(gran, posi, size, &r);
Review Comment:
```suggestion
if (gran_range(gran, posi, size, &r) < 0)
{
memset(&r, 0, sizeof(r));
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]