Skip to content
Commit a645831c authored by Quentin Schulz's avatar Quentin Schulz Committed by Tom Rini
Browse files

cmd: mtd: fix compilation warning for help when SYS_LONGHELP=n

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: default avatarQuentin Schulz <quentin.schulz@bootlin.com>
Reviewed-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent facdc5fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment