[PATCH 1/2] tools: env: Fix printf() warning in fw_env

Simon Glass sjg at chromium.org
Sat Aug 1 18:30:38 CEST 2020


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 at chromium.org>
---

 tools/env/fw_env.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 3ab1ae69c7a..ccbeb5552bc 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;
 		}
-- 
2.28.0.163.g6104cc2f0b6-goog



More information about the U-Boot mailing list