You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/02/11 13:10:29 UTC

[GitHub] [mynewt-mcumgr] utzig commented on a change in pull request #109: mgmt: Uninitialized prev pointer may cause compilation warnings

utzig commented on a change in pull request #109:
URL: https://github.com/apache/mynewt-mcumgr/pull/109#discussion_r574487942



##########
File path: mgmt/src/mgmt.c
##########
@@ -74,7 +74,7 @@ mgmt_streamer_free_buf(struct mgmt_streamer *streamer, void *buf)
 void
 mgmt_unregister_group(struct mgmt_group *group)
 {
-    struct mgmt_group *curr = mgmt_group_list, *prev;
+    struct mgmt_group *curr = mgmt_group_list, *prev = NULL;

Review comment:
       This might fix the warning but it still could break when doing the `prev->mg_next = curr->mg_next;` below. I submitted a review for the original PR and would prefer a fix like suggested.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org