From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alessandro Rubini Date: Sun, 19 Jul 2009 17:13:45 +0200 Subject: [U-Boot] [PATCH] env_onenand: fix compiler warning for error message In-Reply-To: <4A62C194.3060304@googlemail.com> References: <4A62C194.3060304@googlemail.com> Message-ID: <20090719151345.GA17567@mail.gnudd.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Alessandro Rubini Since env_addr is a loff_t (long long), "%08lx" is not a good format; this uses "%08llx" (not "%016llx"), to get 8 or more hex digits. I tnknk padding to 8 digits makes things more readable for "small" numbers, and the unlikely values over 4GB are reported correctly anyways. Signed-off-by: Alessandro Rubini --- I found this during "./MAKEALL arm", and it affects my nhk8815 as well. The warning was already reported today by Dirk Behme, thus this is reply to his message. common/env_onenand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/env_onenand.c b/common/env_onenand.c index 476fdbc..0b03537 100644 --- a/common/env_onenand.c +++ b/common/env_onenand.c @@ -101,7 +101,7 @@ int saveenv(void) instr.addr = env_addr; instr.mtd = mtd; if (mtd->erase(mtd, &instr)) { - printf("OneNAND: erase failed at 0x%08lx\n", env_addr); + printf("OneNAND: erase failed at 0x%08llx\n", (u64)env_addr); return 1; } -- 1.6.0.2