From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Thu, 15 Dec 2011 09:56:54 +0100 Subject: [U-Boot] [PATCH v2 2/3] fat.c: fix printf() length modifier In-Reply-To: <1323939415-21743-1-git-send-email-andreas.devel@googlemail.com> References: <1323939415-21743-1-git-send-email-andreas.devel@googlemail.com> Message-ID: <1323939415-21743-3-git-send-email-andreas.devel@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Andreas Bie?mann 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 cc: Mike Frysinger cc: Thomas Chou cc: rjones at nexus-tech.net cc: kharris at nexus-tech.net --- changes since v1: split off into single patches total: 0 errors, 0 warnings, 8 lines checked NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE 0002-fat.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission. fs/fat/fat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 9a29458..dbb8db9 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -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, -- 1.7.7.3