From: David Sterba Date: Tue, 4 Oct 2016 21:00:20 +0000 (+0200) Subject: btrfs-progs: mkfs: fix warning for printf format on 32bit X-Git-Tag: upstream/4.16.1~1208 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a288d6dafc232f4d9450f9e6c455300e2268c85b;p=platform%2Fupstream%2Fbtrfs-progs.git btrfs-progs: mkfs: fix warning for printf format on 32bit Compiler complains about nlink_t and %ld format on 32bit build. Add typecast and fix the format. Signed-off-by: David Sterba --- diff --git a/mkfs.c b/mkfs.c index 32c9e45..2b6fc64 100644 --- a/mkfs.c +++ b/mkfs.c @@ -900,8 +900,9 @@ static int traverse_directory(struct btrfs_trans_handle *trans, if (ret == -EEXIST) { if (st.st_nlink <= 1) { error( - "item %s already exists but has wrong st_nlink %ld <= 1", - cur_file->d_name, st.st_nlink); + "item %s already exists but has wrong st_nlink %lu <= 1", + cur_file->d_name, + (unsigned long)st.st_nlink); goto fail; } continue;