From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 30 Nov 2017 10:36:21 -0500 Subject: [U-Boot] env: suppress a spurious warning with GCC 7.1 In-Reply-To: <1511303381-57205-1-git-send-email-philipp.tomsich@theobroma-systems.com> References: <1511303381-57205-1-git-send-email-philipp.tomsich@theobroma-systems.com> Message-ID: <20171130153621.GD3587@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Nov 21, 2017 at 11:29:40PM +0100, Philipp Tomsich wrote: > GCC 7.1 seems to be smart enough to track val through the various > static inline functions, but not smart enough to see that val will > always be initialised when no error is returned. This triggers > the following warning: > env/mmc.c: In function 'mmc_get_env_addr': > env/mmc.c:121:12: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized] > > To make it easier for compiler to understand what is going on, let's > initialise val. > > Signed-off-by: Philipp Tomsich > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: