On 30 April 2016 at 16:35, Marek Vasut <ma...@denx.de> 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 <ma...@denx.de> > Cc: Simon Glass <s...@chromium.org> > Cc: Tom Rini <tr...@konsulko.com> > --- > cmd/disk.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass <s...@chromium.org> _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot