From: Kefu Chai Date: Wed, 17 Aug 2016 06:31:16 +0000 (+0800) Subject: cls_rgw: fix the compiler warning X-Git-Tag: v11.0.1~424^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c55d73cef71df0c92cca909e07ffcdb462e5357;p=ceph.git cls_rgw: fix the compiler warning 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 --- 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());