From 53a16db8824ee93ab066e57744cb6f7ea5ba053d Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Sun, 26 Jan 2025 14:41:57 +0800 Subject: ubi-utils: mtdinfo: Fix type truncation compiling warning for 'start' variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix following compiling warning by using the right format: ubi-utils/mtdinfo.c:207:21: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘long long unsigned int’ Fixes: 78f4f38bd3de8 ("ubi-utils: Fix integer overflow in mtdinfo.c") Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubi-utils/mtdinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ubi-utils/mtdinfo.c') diff --git a/ubi-utils/mtdinfo.c b/ubi-utils/mtdinfo.c index 12d35eb..61ce7bc 100644 --- a/ubi-utils/mtdinfo.c +++ b/ubi-utils/mtdinfo.c @@ -204,7 +204,7 @@ static void print_region_map(const struct mtd_dev_info *mtd, int fd, for (i = 0; i < reginfo->numblocks; ++i) { start = reginfo->offset + (unsigned long long)i * reginfo->erasesize; - printf(" %*i: %08lx ", width, i, start); + printf(" %*i: %08llx ", width, i, start); if (ret_locked != -1) { ret_locked = mtd_is_locked(mtd, fd, i); -- cgit v1.2.3