]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
fat.c: fix printf() length modifier
authorAndreas Bießmann <biessmann@corscience.de>
Thu, 15 Dec 2011 08:56:54 +0000 (09:56 +0100)
committerWolfgang Denk <wd@denx.de>
Sat, 17 Dec 2011 22:56:40 +0000 (23:56 +0100)
The DIRENTSPERBLOCK utilizes sizeof() which will return a size_t which has no
fixed size. Therefor use correct length modifer for printf() statement to
prevent compiler warnings.

This patch fixes following warning:

---8<---
fat.c: In function 'do_fat_read':
fat.c:879: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
cc: Mike Frysinger <vapier@gentoo.org>
cc: Thomas Chou <thomas@wytron.com.tw>
cc: rjones@nexus-tech.net
cc: kharris@nexus-tech.net
Acked-by: Mike Frysinger <vapier@gentoo.org>
fs/fat/fat.c

index 9a29458c6c18123a5ebd66b4d93912704f93d5d3..dbb8db92f07a397fdd6998349f3b82ae2d9bca0f 100644 (file)
@@ -876,7 +876,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
        while (1) {
                int i;
 
-               debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%d\n",
+               debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%zd\n",
                        cursect, mydata->clust_size, DIRENTSPERBLOCK);
 
                if (disk_read(cursect,