Skip to contentSkip to conversation

ceph: Use %zu to format size_t in ceph_fill_inline_data()

PATCH In review Geert Uytterhoeven 2 participants 2 messages Dec 21, 2014 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph: Use %zu to format size_t in ceph_fill_inline_data()

On 32-bit, where size_t is unsigned int:

fs/ceph/addr.c: In function ‘ceph_fill_inline_data’:
fs/ceph/addr.c:1419: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 10 has type ‘size_t’

---
 fs/ceph/addr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/addr.c +1 -1
index f5013d92a7e6b73d..c81c0e004588b9e2 100644
@@ -1416,7 +1416,7 @@ void ceph_fill_inline_data(struct inode *inode, struct page *locked_page,
 		}
 	}
 
-	dout("fill_inline_data %p %llx.%llx len %lu locked_page %p\n",
+	dout("fill_inline_data %p %llx.%llx len %zu locked_page %p\n",
 	     inode, ceph_vinop(inode), len, locked_page);
 
 	if (len > 0) {
Signature · 1 line
1.9.1
#1 lore raw
Quoted 15 lines · Geert Uytterhoeven

On 32-bit, where size_t is unsigned int:

fs/ceph/addr.c: In function ‘ceph_fill_inline_data’:
fs/ceph/addr.c:1419: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 10 has type ‘size_t’

---
 fs/ceph/addr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/addr.c +0 -0
index f5013d92a7e6b73d..c81c0e004588b9e2 100644

fs/ceph/addr.c void ceph_fill_inline_data(struct inode *inode, struct page *locked_page, · line 1420

Quoted 6 lines
fs/ceph/addr.c +1 -1
@@ -1416,7 +1416,7 @@ void ceph_fill_inline_data(struct inode *inode, struct page *locked_page,
                }
        }
 
-       dout("fill_inline_data %p %llx.%llx len %lu locked_page %p\n",
+       dout("fill_inline_data %p %llx.%llx len %zu locked_page %p\n",
             inode, ceph_vinop(inode), len, locked_page);

Sorry, it's been reported by kbuild robot a couple days ago and is already fixed along with another warning.

Thanks,

Ilya
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html