]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_rgw: fix the compiler warning
authorKefu Chai <kchai@redhat.com>
Wed, 17 Aug 2016 06:31:16 +0000 (14:31 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 17 Aug 2016 06:31:17 +0000 (14:31 +0800)
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 <kchai@redhat.com>
src/cls/rgw/cls_rgw.cc

index 1a72128e7b146cd311181137e0755382f15724eb..45506972330cfa9b7ed8845820e772bb61d98eae 100644 (file)
@@ -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());