]> www.infradead.org Git - mtd-utils.git/commitdiff
mtd-tests: checkfs: fix size_t related warning
authorBrian Norris <computersforpeace@gmail.com>
Mon, 27 Jun 2011 18:27:18 +0000 (11:27 -0700)
committerArtem Bityutskiy <dedekind1@gmail.com>
Wed, 29 Jun 2011 05:42:37 +0000 (08:42 +0300)
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 <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
tests/checkfs/checkfs.c

index 8e74da80153377b76836543acda66f04aefb0de3..0e67626085135cbaffe8f65528b5ffe17bfc929f 100644 (file)
@@ -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);
                 }