New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rgw: do not try to encode or decode time_t and fix compiling warnings #10751
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time_t is `signed int` on linux, which is ambiguous when encode() or decode() on i386-linux. see also 8f9e7b0. Signed-off-by: Kefu Chai <kchai@redhat.com>
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>
fix warnings like ``` comparison between signed and unsigned integer expressions [-Wsign-compare] ``` Signed-off-by: Kefu Chai <kchai@redhat.com>
pushed to wip-kefu-testing, see http://gitbuilder.sepia.ceph.com/gitbuilder-ceph-deb-trusty-i386-basic/#origin/wip-kefu-testing |
silence warnings like ``` src/os/filestore/FileStore.h:55:27: comparison between signed and unsigned integer expressions [-Wsign-compare] ^ /srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-11.0.0-1566-ga98ddf7/src/os/filestore/BtrfsFileStoreBackend.cc:269:29: note: in expansion of macro ‘BTRFS_SUPER_MAGIC’ if (currentfs.f_type == BTRFS_SUPER_MAGIC && basest.st_dev != st.st_dev) { ^ ``` Signed-off-by: Kefu Chai <kchai@redhat.com>
silence warnings like: ``` src/test/librbd/fsx.cc:1589:21: comparison between signed and unsigned integer expressions [-Wsign-compare] (offset + size > monitorstart && ^ ``` Signed-off-by: Kefu Chai <kchai@redhat.com>
printf() a uint64 in a portable way (i.e. C98 compliant way). Signed-off-by: Kefu Chai <kchai@redhat.com>
tchaikov
force-pushed
the
wip-kefu-testing
branch
from
August 17, 2016 10:58
8564a50
to
c59f402
Compare
@@ -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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pleasantly surprised to find this, and to find that it's also standard enough to be part of Solaris.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
time_t is
signed int
on linux, which is ambiguous when encode() or decode() on i386-linux.see also 8f9e7b0.
Signed-off-by: Kefu Chai kchai@redhat.com