From: Tom Rini Date: Fri, 18 Jan 2019 21:53:49 -0500 Subject: [U-Boot] cmd: mtd: fix compilation warning for help when SYS_LONGHELP=n In-Reply-To: <20190117091847.27646-1-quentin.schulz@bootlin.com> References: <20190117091847.27646-1-quentin.schulz@bootlin.com> Message-ID: <20190119025349.GP27429@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de 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 > Reviewed-by: Miquel Raynal 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: