From: York Sun Date: Mon, 7 Aug 2017 16:16:23 -0700 Subject: [U-Boot] [PATCH v2 2/5] cmd: spl: Fix compiling warning In-Reply-To: <1502147786-8269-1-git-send-email-york.sun@nxp.com> References: <1502147786-8269-1-git-send-email-york.sun@nxp.com> Message-ID: <1502147786-8269-3-git-send-email-york.sun@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Fix warning "cast from pointer to integer of different size". Signed-off-by: York Sun --- Changes in v2: None cmd/spl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/spl.c b/cmd/spl.c index 057764a..562140a 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -108,12 +108,12 @@ static int spl_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) c = find_cmd_tbl(argv[1], &cmd_spl_export_sub[0], ARRAY_SIZE(cmd_spl_export_sub)); - if ((c) && ((int)c->cmd <= SPL_EXPORT_LAST)) { + if ((c) && ((long)c->cmd <= SPL_EXPORT_LAST)) { argc -= 2; argv += 2; - if (call_bootm(argc, argv, subcmd_list[(int)c->cmd])) + if (call_bootm(argc, argv, subcmd_list[(long)c->cmd])) return -1; - switch ((int)c->cmd) { + switch ((long)c->cmd) { #ifdef CONFIG_OF_LIBFDT case SPL_EXPORT_FDT: printf("Argument image is now in RAM: 0x%p\n", @@ -147,7 +147,7 @@ static int do_spl(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) c = find_cmd_tbl(argv[1], &cmd_spl_sub[0], ARRAY_SIZE(cmd_spl_sub)); if (c) { - cmd = (int)c->cmd; + cmd = (long)c->cmd; switch (cmd) { case SPL_EXPORT: argc--; -- 2.7.4