]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crush: pass by const reference to kill compiling error
authorKefu Chai <kchai@redhat.com>
Sat, 29 Apr 2017 18:04:51 +0000 (02:04 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 1 May 2017 07:45:42 +0000 (15:45 +0800)
commitc8ca98ed02b38d11672ee7f86ebf977289cdf403
tree3f514c46bcee404cc4f28daf8b1c20c881303d27
parent4e0f7b48b01281c6926b15456275e314ff9aa416
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>
src/crush/CrushCompiler.cc
src/crush/CrushCompiler.h