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

test: kill warnings #14892

Merged
merged 5 commits into from May 1, 2017

Conversation

Projects
None yet
2 participants
@tchaikov
Contributor

tchaikov commented May 1, 2017

No description provided.

tchaikov added some commits Apr 29, 2017

cls/rbd: print uint64_t in a platform neutral way
Signed-off-by: Kefu Chai <kchai@redhat.com>
crush: pass by const reference to kill compiling error
i have following error when compiling with gcc-6 on armhf

ceph/src/crush/CrushCompiler.cc: In member function 'int
CrushCompiler::decompile(std::ostream&)':
ceph/src/crush/CrushCompiler.cc:462:45: error: invalid initialization of
non-const reference of type 'std::pair<const long unsigned int,
crush_choo
se_arg_map>&' from an rvalue of type 'std::pair<const long unsigned int,
crush_choose_arg_map>'
       int ret = decompile_choose_args(i, out);

Signed-off-by: Kefu Chai <kchai@redhat.com>
test/librbd: print uint64_t in a platform neutral way
Signed-off-by: Kefu Chai <kchai@redhat.com>

@tchaikov tchaikov requested review from and dillaman May 1, 2017

@ghost

ghost approved these changes May 1, 2017

on the crush part. Sorry I missed that ...

@@ -664,7 +664,7 @@ TEST_F(TestInternal, ResizeCopyup)
bufferlist bl;
bl.append(std::string(4096, '1'));
for (size_t i = 0; i < m_image_size; i += bl.length()) {
ASSERT_EQ(bl.length(), ictx->io_work_queue->write(i, bl.length(),
ASSERT_EQ((ssize_t)bl.length(), ictx->io_work_queue->write(i, bl.length(),
bufferlist{bl}, 0));

This comment has been minimized.

@dillaman

dillaman May 1, 2017

Contributor

Nit: indentation is off here

@@ -733,7 +733,7 @@ TEST_F(TestInternal, DiscardCopyup)
bufferlist bl;
bl.append(std::string(4096, '1'));
for (size_t i = 0; i < m_image_size; i += bl.length()) {
ASSERT_EQ(bl.length(), ictx->io_work_queue->write(i, bl.length(),
ASSERT_EQ((ssize_t)bl.length(), ictx->io_work_queue->write(i, bl.length(),
bufferlist{bl}, 0));

This comment has been minimized.

@dillaman

dillaman May 1, 2017

Contributor

Nit: indentation is off here

test/librbd: silence warning from -Wsign-compare
Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov

This comment has been minimized.

Contributor

tchaikov commented May 1, 2017

@dillaman fixed and repushed

@@ -106,6 +106,7 @@ class MockTestMemIoCtxImpl : public TestMemIoCtxImpl {
std::map<uint64_t, uint64_t> *m, bufferlist *bl){
return TestMemIoCtxImpl::sparse_read(oid, off, len, m, bl);
}
using TestMemIoCtxImpl::sparse_read;

This comment has been minimized.

@dillaman

dillaman May 1, 2017

Contributor

The warning is that the size_t len parameter doesn't match (should be uint64_t) -- the param type needs to be fixed and then you can removed this using.

This comment has been minimized.

@tchaikov

tchaikov May 1, 2017

Contributor

thanks, fixed.

test/librados: silence -Woverloaded-virtual warning
Signed-off-by: Kefu Chai <kchai@redhat.com>
@dillaman

lgtm

@tchaikov tchaikov merged commit ab77b1d into ceph:master May 1, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@tchaikov tchaikov deleted the tchaikov:wip-kill-warnings branch May 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment