anchao commented on code in PR #14575:
URL: https://github.com/apache/nuttx/pull/14575#discussion_r1824032787


##########
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:
   Sure, but some additional testing may be needed. we could memset the `getr_t 
r` on failure case if we just want to clear the warning, which is consistent 
with the previous semantics.



-- 
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]

Reply via email to