[U-Boot] [PATCH 10/32] include/command.h: sparse fix
Tom Rini
trini at ti.com
Thu Oct 25 18:35:19 CEST 2012
On Tue, Oct 16, 2012 at 07:28:26PM -0500, Kim Phillips wrote:
> __u_boot_cmd_* should be declared static, e.g.:
>
> cmd_mem.c:1142:1: warning: symbol '__u_boot_cmd_md' was not declared. Should it be static?
> cmd_mem.c:1149:1: warning: symbol '__u_boot_cmd_mm' was not declared. Should it be static?
> cmd_mem.c:1156:1: warning: symbol '__u_boot_cmd_nm' was not declared. Should it be static?
> cmd_mem.c:1162:1: warning: symbol '__u_boot_cmd_mw' was not declared. Should it be static?
> cmd_mem.c:1168:1: warning: symbol '__u_boot_cmd_cp' was not declared. Should it be static?
> cmd_mem.c:1174:1: warning: symbol '__u_boot_cmd_cmp' was not declared. Should it be static?
> cmd_mem.c:1184:1: warning: symbol '__u_boot_cmd_crc32' was not declared. Should it be static?
> cmd_mem.c:1203:1: warning: symbol '__u_boot_cmd_base' was not declared. Should it be static?
> cmd_mem.c:1210:1: warning: symbol '__u_boot_cmd_loop' was not declared. Should it be static?
> cmd_mem.c:1224:1: warning: symbol '__u_boot_cmd_mtest' was not declared. Should it be static?
>
> Signed-off-by: Kim Phillips <kim.phillips at freescale.com>
> ---
> include/command.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/command.h b/include/command.h
> index 1f06aa1..c051158 100644
> --- a/include/command.h
> +++ b/include/command.h
> @@ -174,7 +174,7 @@ int cmd_process(int flag, int argc, char * const argv[],
> U_BOOT_CMD_MKENT_COMPLETE(name,maxargs,rep,cmd,usage,help,NULL)
>
> #define U_BOOT_CMD_COMPLETE(name,maxargs,rep,cmd,usage,help,comp) \
> - cmd_tbl_t __u_boot_cmd_##name Struct_Section = \
> + static cmd_tbl_t __u_boot_cmd_##name Struct_Section = \
> U_BOOT_CMD_MKENT_COMPLETE(name,maxargs,rep,cmd,usage,help,comp)
>
> #define U_BOOT_CMD(name,maxargs,rep,cmd,usage,help) \
I tried porting this change to the LG-arrays that are now in master and
that resulted in no commands being available. Please re-do and test
against master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121025/ab8da0e0/attachment.pgp>
More information about the U-Boot
mailing list