From: Heinrich Schuchardt Date: Sun, 3 Nov 2024 22:48:11 +0000 (+0100) Subject: test: use %zd for size_t in mbr_test_run() X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/index.xml?a=commitdiff_plain;h=5430a5f67e5f73b0411d550b5dd6aa446a3b0299;p=u-boot.git test: use %zd for size_t in mbr_test_run() For printing size_t we must use %zd and not %ld to avoid a -Wformat error on 32-bit systems. Signed-off-by: Heinrich Schuchardt --- diff --git a/test/cmd/mbr.c b/test/cmd/mbr.c index 16a8bc39e7..d137378a3b 100644 --- a/test/cmd/mbr.c +++ b/test/cmd/mbr.c @@ -257,8 +257,8 @@ static int mbr_test_run(struct unit_test_state *uts) strlen(mbr_parts_p3) + max(strlen(mbr_parts_p4), strlen(mbr_parts_p5)) + strlen(mbr_parts_tail); - ut_assertf(sizeof(mbr_parts_buf) >= mbr_parts_max, "Buffer avail: %ld; buffer req: %ld\n", - sizeof(mbr_parts_buf), mbr_parts_max); + ut_assertf(sizeof(mbr_parts_buf) >= mbr_parts_max, "Buffer avail: %zd; buffer req: %ld\n", + sizeof(mbr_parts_buf), mbr_parts_max); mbr_wbuf = map_sysmem(mbr_wa, BLKSZ); ebr_wbuf = map_sysmem(ebr_wa, BLKSZ);