]> git.baikalelectronics.ru Git - uboot.git/commit
env: suppress a spurious warning with GCC 7.1
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tue, 21 Nov 2017 22:29:40 +0000 (23:29 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 30 Nov 2017 03:36:58 +0000 (22:36 -0500)
commit61d955ea2830ec8972445331dfaa5996613e72e0
treebf80b3bb1154cd9f6194cc383f9f8b86fdf4e9b7
parentd67491a3cb16aa1c0dfbe4f3152d41b1e89cc0d3
env: suppress a spurious warning with GCC 7.1

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 <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
env/mmc.c