[U-Boot] cmd: mtd: fix compilation warning for help when SYS_LONGHELP=n
Tom Rini
trini at konsulko.com
Sat Jan 19 02:53:49 UTC 2019
On Thu, Jan 17, 2019 at 10:18:47AM +0100, Quentin Schulz wrote:
> cmd/mtd.c:447:13: warning: ‘mtd_help_text’ defined but not used [-Wunused-variable]
> static char mtd_help_text[] =
> ^~~~~~~~~~~~~
>
> When SYS_LONGHELP is not defined. After looking at how other commands
> work, we should surround the whole help text (even its declaration) with
> an #ifdef CONFIG_SYS_LONGHELP, since it's compiled out when calling
> _CMD_HELP[1] on the help text variable argument to U_BOOT_CMD.
>
> [1] https://elixir.bootlin.com/u-boot/latest/source/include/command.h#L181
>
> Signed-off-by: Quentin Schulz <quentin.schulz at bootlin.com>
> Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>
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: <http://lists.denx.de/pipermail/u-boot/attachments/20190118/4755b2d4/attachment.sig>
More information about the U-Boot
mailing list