From: Simon Glass <sjg@chromium.org>
Date: Sat, 1 Aug 2020 16:30:38 +0000 (-0600)
Subject: tools: env: Fix printf() warning in fw_env
X-Git-Tag: v2025.01-rc5-pxa1908~2271^2~1
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/%7B%7B?a=commitdiff_plain;h=d9cd4d2a8d429068a6a5061a33459ae3ae113ef8;p=u-boot.git

tools: env: Fix printf() warning in fw_env

The printf() string produces a warning about %d not matching size_t. Fix
it and put the format string on one line to avoid a checkpatch warning.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 3ab1ae69c7..ccbeb5552b 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -952,8 +952,8 @@ static int flash_read_buf(int dev, int fd, void *buf, size_t count,
 			return -1;
 		}
 		if (rc != readlen) {
-			fprintf(stderr, "Read error on %s: "
-				"Attempted to read %d bytes but got %d\n",
+			fprintf(stderr,
+				"Read error on %s: Attempted to read %zd bytes but got %d\n",
 				DEVNAME(dev), readlen, rc);
 			return -1;
 		}