[PATCHv1 2/5] serve_image: adjust type for printf

Andy Shevchenko ext-andriy.shevchenko at nokia.com
Wed Apr 13 09:20:26 EDT 2011


The argument type of printf is __off64_t, meanwhile the classificator is "%ld".

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko at nokia.com>
---
 serve_image.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/serve_image.c b/serve_image.c
index f8f28a1..9eaf9dd 100644
--- a/serve_image.c
+++ b/serve_image.c
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
 
 	if (st.st_size % erasesize) {
 		fprintf(stderr, "Image size %ld bytes is not a multiple of erasesize %d bytes\n",
-			st.st_size, erasesize);
+			(long)st.st_size, erasesize);
 		exit(1);
 	}
 	image = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, rfd, 0);
-- 
1.6.3.3




More information about the linux-mtd mailing list