From: Brian Norris Date: Mon, 27 Jun 2011 18:27:18 +0000 (-0700) Subject: mtd-tests: checkfs: fix size_t related warning X-Git-Tag: v1.4.7~49 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=59423eba6af3dbac53a1687e9f3cb31cfaad0680;p=mtd-utils.git mtd-tests: checkfs: fix size_t related warning Depending on your compiler, size_t may or may not be long unsigned int. Use printf's %zu format to clarify. Warning message: checkfs.c:524:28: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int' Signed-off-by: Brian Norris Acked-by: Mike Frysinger Signed-off-by: Artem Bityutskiy --- diff --git a/tests/checkfs/checkfs.c b/tests/checkfs/checkfs.c index 8e74da8..0e67626 100644 --- a/tests/checkfs/checkfs.c +++ b/tests/checkfs/checkfs.c @@ -520,7 +520,7 @@ void processCmdLine(int argc, char **argv) FileSizeMax = (float)atoi(argv[++cnt]); if(FileSizeMax > (MAX_INTS_ALLOW*sizeof(int))) { - printf("Max file size allowed is %lu.\n", + printf("Max file size allowed is %zu.\n", MAX_INTS_ALLOW*sizeof(int)); exit(0); }