[U-Boot] [PATCH] cmd: disk: Fix unused variable warning
Tom Rini
trini at konsulko.com
Tue May 3 01:31:28 CEST 2016
On Sun, May 01, 2016 at 12:35:54AM +0200, Marek Vasut wrote:
> If serial support is not compiled into U-Boot, which may be the case
> for some SPL builds, the following warning will be generated in disk.c:
>
> cmd/disk.c: In function 'common_diskboot':
> cmd/disk.c:16:6: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
> int dev, part;
> ^
> The warning is a result of printf() calls being optimized away, and
> thus the whole dev variable becomes indeed unused. Mark the variable
> as __maybe_unused .
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Tom Rini <trini at konsulko.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160502/1214ec1a/attachment.sig>
More information about the U-Boot
mailing list