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 2018/04/14 01:39:09 UTC

[GitHub] ccollins476ad closed pull request #1025: imgmgr: Prevent `maybe-uninitialized` warning.

ccollins476ad closed pull request #1025: imgmgr: Prevent `maybe-uninitialized` warning.
URL: https://github.com/apache/mynewt-core/pull/1025
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/mgmt/imgmgr/src/imgmgr.c b/mgmt/imgmgr/src/imgmgr.c
index 4681e1b7b..f2c2a0a64 100644
--- a/mgmt/imgmgr/src/imgmgr.c
+++ b/mgmt/imgmgr/src/imgmgr.c
@@ -138,6 +138,9 @@ imgr_read_info(int image_slot, struct image_version *ver, uint8_t *hash,
     uint32_t data_off, data_end;
     int area_id;
 
+    /* Silence spurious warning. */
+    data_end = 0;
+
     area_id = flash_area_id_from_image_slot(image_slot);
 
     hdr = (struct image_header *)data;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services