From 6c55d73cef71df0c92cca909e07ffcdb462e5357 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 17 Aug 2016 14:31:16 +0800 Subject: [PATCH] cls_rgw: fix the compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit fixes the warning of ``` warning: /srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-11.0.0-1566-ga98ddf7/src/objclass/objclass.h:35:72: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘std::basic_string::size_type {aka unsigned int}’ [-Wformat=] cls_log(level, " %s:%d: " fmt, __FILE__, __LINE__, ##__VA_ARGS__) ^ /srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-11.0.0-1566-ga98ddf7/src/cls/rgw/cls_rgw.cc:477:7: note: in expansion of macro ‘CLS_LOG’ CLS_LOG(20, "start_key=%s len=%lu", start_key.c_str(), start_key.size()); ^ ``` Signed-off-by: Kefu Chai --- src/cls/rgw/cls_rgw.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 1a72128e7b1..45506972330 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -474,7 +474,7 @@ int rgw_bucket_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out) decode_list_index_key(kiter->first, &key, &ver); start_key = kiter->first; - CLS_LOG(20, "start_key=%s len=%lu", start_key.c_str(), start_key.size()); + CLS_LOG(20, "start_key=%s len=%zu", start_key.c_str(), start_key.size()); if (!entry.is_valid()) { CLS_LOG(20, "entry %s[%s] is not valid\n", key.name.c_str(), key.instance.c_str()); -- 2.47.3