Hi, Please find the latest report on new defect(s) introduced to ceph found with Coverity Scan. 120 new defect(s) introduced to ceph found with Coverity Scan. 13 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 20 of 120 defect(s) ** CID 1592287: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/crush/CrushWrapper.cc: 2476 in CrushWrapper::add_indep_multi_osd_per_failure_domain_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_ostream<char, std::char_traits<char>>*)() ________________________________________________________________________________________________________ *** CID 1592287: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/crush/CrushWrapper.cc: 2476 in CrushWrapper::add_indep_multi_osd_per_failure_domain_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_ostream<char, std::char_traits<char>>*)() 2470 int osds_per_failure_domain, 2471 string device_class, 2472 ostream *err) 2473 { 2474 return add_multi_osd_per_failure_domain_rule_at( 2475 name, root_name, >>> CID 1592287: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "failure_domain_name" is passed-by-value as parameter to "add_multi_osd_per_failure_domain_rule_at" when it could be moved instead. 2476 failure_domain_name, 2477 num_failure_domains, 2478 osds_per_failure_domain, 2479 device_class, 2480 CRUSH_RULE_TYPE_MSR_INDEP, 2481 -1, ** CID 1592286: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/crush/CrushWrapper.h: 1269 in CrushWrapper::add_simple_rule_at(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, std::basic_ostream<char, std::char_traits<char>>*)() ________________________________________________________________________________________________________ *** CID 1592286: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/crush/CrushWrapper.h: 1269 in CrushWrapper::add_simple_rule_at(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, std::basic_ostream<char, std::char_traits<char>>*)() 1263 std::string name, std::string root_name, 1264 std::string failure_domain_type, 1265 std::string device_class, std::string mode, 1266 int rule_type, int rno, std::ostream *err = 0) { 1267 return add_simple_rule_at( 1268 name, root_name, failure_domain_type, -1, >>> CID 1592286: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "device_class" is passed-by-value as parameter to "add_simple_rule_at" when it could be moved instead. 1269 device_class, mode, rule_type, rno, err); 1270 } 1271 1272 int add_multi_osd_per_failure_domain_rule_at( 1273 std::string name, std::string root_name, std::string failure_domain_type, 1274 int osds_per_failure_domain, ** CID 1592285: Uninitialized variables (UNINIT) /src/static/src/github/ceph/src/qatlib/quickassist/lookaside/access_layer/src/sample_code/functional/sym/hkdf_sample/cpa_hkdf_sample.c: 601 in hkdfSampleExtractExpandPerform() ________________________________________________________________________________________________________ *** CID 1592285: Uninitialized variables (UNINIT) /src/static/src/github/ceph/src/qatlib/quickassist/lookaside/access_layer/src/sample_code/functional/sym/hkdf_sample/cpa_hkdf_sample.c: 601 in hkdfSampleExtractExpandPerform() 595 * sure that the structures won't be needed any more. Free the 596 * memory! 597 */ 598 PHYS_CONTIG_FREE(pHkdfData); 599 PHYS_CONTIG_FREE(pOpData); 600 >>> CID 1592285: Uninitialized variables (UNINIT) >>> Using uninitialized value "complete.semaphore" when calling "sem_destroy". 601 COMPLETION_DESTROY(&complete); 602 603 return status; 604 } 605 606 CpaStatus hkdfSample(void) ** CID 1592284: Incorrect expression (USELESS_CALL) ________________________________________________________________________________________________________ *** CID 1592284: Incorrect expression (USELESS_CALL) /src/static/src/github/ceph/src/qatzip/test/main.c: 3321 in qzCompressFailedAtBufferOverflow() 3315 done: 3316 free(src); 3317 free(comp); 3318 free(low_comp); 3319 free(low_decomp); 3320 (void)qzTeardownSession(&sess); >>> CID 1592284: Incorrect expression (USELESS_CALL) >>> Calling "qzClose(&sess)" is only useful for its return value, which is ignored. 3321 qzClose(&sess); 3322 return rc; 3323 } 3324 3325 int doQzCompressCrcCheck(size_t orig_sz) 3326 { ** CID 1592283: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/osd/ECBackend.cc: 763 in ECBackend::recover_object(const hobject_t &, eversion_t, std::shared_ptr<ObjectContext>, std::shared_ptr<ObjectContext>, PGBackend::RecoveryHandle *)() ________________________________________________________________________________________________________ *** CID 1592283: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/osd/ECBackend.cc: 763 in ECBackend::recover_object(const hobject_t &, eversion_t, std::shared_ptr<ObjectContext>, std::shared_ptr<ObjectContext>, PGBackend::RecoveryHandle *)() 757 const hobject_t &hoid, 758 eversion_t v, 759 ObjectContextRef head, 760 ObjectContextRef obc, 761 RecoveryHandle *_h) 762 { >>> CID 1592283: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "head" is passed-by-value as parameter to "recover_object" when it could be moved instead. 763 return recovery_backend.recover_object(hoid, v, head, obc, _h); 764 } 765 766 int ECBackend::RecoveryBackend::recover_object( 767 const hobject_t &hoid, 768 eversion_t v, ** CID 1592282: Incorrect expression (USELESS_CALL) ________________________________________________________________________________________________________ *** CID 1592282: Incorrect expression (USELESS_CALL) /src/static/src/github/ceph/src/qatzip/test/main.c: 3094 in qzDecompressHWFailedAtUnknownGzipBlock() 3088 3089 done: 3090 qzFree(orig_src); 3091 qzFree(comp_src); 3092 qzFree(decomp_src); 3093 (void)qzTeardownSession(&sess); >>> CID 1592282: Incorrect expression (USELESS_CALL) >>> Calling "qzClose(&sess)" is only useful for its return value, which is ignored. 3094 qzClose(&sess); 3095 return rc; 3096 } 3097 3098 int qzDecompressForceSW(void) 3099 { ** CID 1592281: Error handling issues (CHECKED_RETURN) /src/static/src/github/ceph/src/qatlib/quickassist/lookaside/access_layer/src/sample_code/performance/compression/qat_compression_utils.c: 1921 in performDcChainOffloadCalculationBusyLoop() ________________________________________________________________________________________________________ *** CID 1592281: Error handling issues (CHECKED_RETURN) /src/static/src/github/ceph/src/qatlib/quickassist/lookaside/access_layer/src/sample_code/performance/compression/qat_compression_utils.c: 1921 in performDcChainOffloadCalculationBusyLoop() 1915 upperBound = pPerfData->busyLoopValue; 1916 1917 while (CPA_STATUS_SUCCESS == status && lowerBound <= upperBound) 1918 { 1919 pPerfData->busyLoopValue = (upperBound + lowerBound) / 2; 1920 >>> CID 1592281: Error handling issues (CHECKED_RETURN) >>> Calling "qatDcChainCompressData" without checking return value (as is done elsewhere 5 out of 6 times). 1921 qatDcChainCompressData(setup, 1922 pSessionHandle, 1923 dcSessDir, 1924 arrayOfSrcBufferLists, 1925 arrayOfDestBufferLists, 1926 arrayOfCmpBufferLists, ** CID 1592280: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/rgw/driver/rados/rgw_rados.cc: 3114 in RGWRados::Object::Write::_do_write_meta(unsigned long, unsigned long, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ceph::buffer::v15_2_0::list, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ceph::buffer::v15_2_0::list>>> &, bool, bool, void *, const req_context &, opentelemetry::v1::trace::SpanContext &, bool)() ________________________________________________________________________________________________________ *** CID 1592280: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/rgw/driver/rados/rgw_rados.cc: 3114 in RGWRados::Object::Write::_do_write_meta(unsigned long, unsigned long, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ceph::buffer::v15_2_0::list, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ceph::buffer::v15_2_0::list>>> &, bool, bool, void *, const req_context &, opentelemetry::v1::trace::SpanContext &, bool)() 3108 3109 if (target->get_bucket_info().obj_lock_enabled() && target->get_bucket_info().obj_lock.has_rule() && meta.flags == PUT_OBJ_CREATE) { 3110 auto iter = attrs.find(RGW_ATTR_OBJECT_RETENTION); 3111 if (iter == attrs.end()) { 3112 real_time lock_until_date = target->get_bucket_info().obj_lock.get_lock_until_date(meta.set_mtime); 3113 string mode = target->get_bucket_info().obj_lock.get_mode(); >>> CID 1592280: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "mode" is passed-by-value as parameter to "RGWObjectRetention::RGWObjectRetention(std::string, ceph::real_time)" when it could be moved instead. 3114 RGWObjectRetention obj_retention(mode, lock_until_date); 3115 bufferlist bl; 3116 obj_retention.encode(bl); 3117 op.setxattr(RGW_ATTR_OBJECT_RETENTION, bl); 3118 } 3119 } ** CID 1592279: Incorrect expression (USELESS_CALL) ________________________________________________________________________________________________________ *** CID 1592279: Incorrect expression (USELESS_CALL) /src/static/src/github/ceph/src/qatzip/test/main.c: 2951 in qzDecompressFailedAtUnknownGzipHeader() 2945 2946 done: 2947 qzFree(orig_src); 2948 qzFree(comp_src); 2949 qzFree(decomp_src); 2950 (void)qzTeardownSession(&sess); >>> CID 1592279: Incorrect expression (USELESS_CALL) >>> Calling "qzClose(&sess)" is only useful for its return value, which is ignored. 2951 qzClose(&sess); 2952 return rc; 2953 } 2954 2955 int qzDecompressSWFailedAtUnknownGzipBlock(void) 2956 { ** CID 1592278: Error handling issues (CHECKED_RETURN) /src/static/src/github/ceph/src/test/objectstore/allocator_replay_test.cc: 730 in main::[lambda(Allocator *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &) (instance 4)]::operator ()(Allocator *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &) const() ________________________________________________________________________________________________________ *** CID 1592278: Error handling issues (CHECKED_RETURN) /src/static/src/github/ceph/src/test/objectstore/allocator_replay_test.cc: 730 in main::[lambda(Allocator *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &) (instance 4)]::operator ()(Allocator *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &) const() 724 << std::endl; 725 726 /* Do not release. */ 727 //alloc->release(extents); 728 extents.clear(); 729 } >>> CID 1592278: Error handling issues (CHECKED_RETURN) >>> Calling "fseek" without checking return value (as is done elsewhere 10 out of 11 times). 730 fseek(f_alloc_list, 0, SEEK_SET); 731 } 732 fclose(f_alloc_list); 733 std::cout << "Fragmentation:" << a->get_fragmentation() 734 << std::endl; 735 std::cout << "Fragmentation score:" << a->get_fragmentation_score() ** CID 1592277: Error handling issues (CHECKED_RETURN) /src/static/src/github/ceph/src/qatlib/quickassist/lookaside/access_layer/src/qat_direct/vfio/adf_vfio_user_proxy.c: 110 in adf_io_userProcessStop() ________________________________________________________________________________________________________ *** CID 1592277: Error handling issues (CHECKED_RETURN) /src/static/src/github/ceph/src/qatlib/quickassist/lookaside/access_layer/src/qat_direct/vfio/adf_vfio_user_proxy.c: 110 in adf_io_userProcessStop() 104 struct qatmgr_msg_req req = {0}; 105 struct qatmgr_msg_rsp rsp = {0}; 106 107 assert(sizeof(req.name) == sizeof(currentProcess)); 108 ICP_STRLCPY(req.name, currentProcess, sizeof(req.name)); 109 >>> CID 1592277: Error handling issues (CHECKED_RETURN) >>> Calling "qatmgr_query" without checking return value (as is done elsewhere 9 out of 10 times). 110 qatmgr_query(&req, &rsp, QATMGR_MSGTYPE_SECTION_PUT); 111 112 memset(currentProcess, 0, QATMGR_MAX_STRLEN); 113 114 qatmgr_close(); 115 ** CID 1592276: Incorrect expression (USELESS_CALL) ________________________________________________________________________________________________________ *** CID 1592276: Incorrect expression (USELESS_CALL) /src/static/src/github/ceph/src/qatzip/test/main.c: 3449 in qzCompressSWL9DecompressHW() 3443 3444 done: 3445 qzFree(orig_src); 3446 qzFree(comp_src); 3447 qzFree(decomp_src); 3448 (void)qzTeardownSession(&sess); >>> CID 1592276: Incorrect expression (USELESS_CALL) >>> Calling "qzClose(&sess)" is only useful for its return value, which is ignored. 3449 qzClose(&sess); 3450 return rc; 3451 } 3452 3453 int qzFuncTests(void) 3454 { ** CID 1592275: Incorrect expression (USELESS_CALL) ________________________________________________________________________________________________________ *** CID 1592275: Incorrect expression (USELESS_CALL) /src/static/src/github/ceph/src/qatzip/test/main.c: 3265 in qzDecompressStandalone() 3259 3260 done: 3261 free(orig_src); 3262 free(comp_src); 3263 free(decomp_src); 3264 (void)qzTeardownSession(&sess); >>> CID 1592275: Incorrect expression (USELESS_CALL) >>> Calling "qzClose(&sess)" is only useful for its return value, which is ignored. 3265 qzClose(&sess); 3266 return rc; 3267 } 3268 3269 int qzCompressFailedAtBufferOverflow(void) 3270 { ** CID 1592274: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/crush/CrushWrapper.cc: 2370 in CrushWrapper::add_simple_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::basic_ostream<char, std::char_traits<char>>*)() ________________________________________________________________________________________________________ *** CID 1592274: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/crush/CrushWrapper.cc: 2370 in CrushWrapper::add_simple_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::basic_ostream<char, std::char_traits<char>>*)() 2364 int num_failure_domains, 2365 string device_class, 2366 string mode, int rule_type, 2367 ostream *err) 2368 { 2369 return add_simple_rule_at( >>> CID 1592274: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "root_name" is passed-by-value as parameter to "add_simple_rule_at" when it could be moved instead. 2370 name, root_name, failure_domain_name, num_failure_domains, 2371 device_class, 2372 mode, 2373 rule_type, -1, err); 2374 } 2375 ** CID 1592273: Incorrect expression (USELESS_CALL) ________________________________________________________________________________________________________ *** CID 1592273: Incorrect expression (USELESS_CALL) /src/static/src/github/ceph/src/qatzip/test/main.c: 3360 in doQzCompressCrcCheck() 3354 } 3355 3356 done: 3357 free(src); 3358 free(comp); 3359 (void)qzTeardownSession(&sess); >>> CID 1592273: Incorrect expression (USELESS_CALL) >>> Calling "qzClose(&sess)" is only useful for its return value, which is ignored. 3360 qzClose(&sess); 3361 return rc; 3362 } 3363 3364 int qzCompressCrcCheck(void) 3365 { ** CID 1592272: Error handling issues (UNCAUGHT_EXCEPT) /src/static/src/github/ceph/src/crypto/qat/qcccrypto.h: 60 in QccCrypto::~QccCrypto()() ________________________________________________________________________________________________________ *** CID 1592272: Error handling issues (UNCAUGHT_EXCEPT) /src/static/src/github/ceph/src/crypto/qat/qcccrypto.h: 60 in QccCrypto::~QccCrypto()() 54 auto async_get_instance(CompletionToken&& token); 55 56 public: 57 CpaCySymCipherDirection qcc_op_type; 58 59 QccCrypto() {}; >>> CID 1592272: Error handling issues (UNCAUGHT_EXCEPT) >>> An exception of type "boost::container::length_error_t" is thrown but the exception specification "/*implicit*/noexcept" doesn't allow it to be thrown. This will result in a call to terminate(). 60 ~QccCrypto() { destroy(); }; 61 62 bool init(const size_t chunk_size, const size_t max_requests); 63 bool destroy(); 64 bool perform_op_batch(unsigned char* out, const unsigned char* in, size_t size, 65 Cpa8U *iv, ** CID 1592271: Code maintainability issues (UNUSED_VALUE) /src/static/src/github/ceph/src/qatlib/quickassist/lookaside/access_layer/src/sample_code/performance/compression/cpa_sample_code_dc_dp.c: 2100 in setupDcDpTest() ________________________________________________________________________________________________________ *** CID 1592271: Code maintainability issues (UNUSED_VALUE) /src/static/src/github/ceph/src/qatlib/quickassist/lookaside/access_layer/src/sample_code/performance/compression/cpa_sample_code_dc_dp.c: 2100 in setupDcDpTest() 2094 " number of buffers available (%d)\n", 2095 numRequests, 2096 numberOfBuffersPerFile); 2097 2098 return CPA_STATUS_FAIL; 2099 } >>> CID 1592271: Code maintainability issues (UNUSED_VALUE) >>> Assigning value "0U" to "numberOfBuffersPerFile" here, but that stored value is overwritten before it can be used. 2100 numberOfBuffersPerFile = 0; 2101 } 2102 2103 return status; ** CID 1592270: Incorrect expression (USELESS_CALL) ________________________________________________________________________________________________________ *** CID 1592270: Incorrect expression (USELESS_CALL) /src/static/src/github/ceph/src/qatzip/utils/qzip.c: 540 in qatzipClose() 534 return 0; 535 } 536 537 int qatzipClose(QzSession_T *sess) 538 { 539 qzTeardownSession(sess); >>> CID 1592270: Incorrect expression (USELESS_CALL) >>> Calling "qzClose(sess)" is only useful for its return value, which is ignored. 540 qzClose(sess); 541 542 return 0; 543 } 544 545 QzSuffix_T getSuffix(const char *filename) ** CID 1592269: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/rgw/rgw_aio.cc: 94 in _ZN3rgw11_GLOBAL__N_12aio_abstractIN8librados7v14_2_020ObjectWriteOperationEEEN3fu27abi_3106detail8functionINS7_6configILb1ELb0ELm16EEENS7_8propertyILb1ELb0EJFvPNS_3AioERNS_9AioResultEOEEEEEENS3_5IoCtxEOT_RN5boost4asio10io_contextEN5spawn19basic_yield_contextINSN_15executor_binderIPFvvENSN_15any_io_executorEEEEEPN13opentelemetry2v15trace11SpanContextE() ________________________________________________________________________________________________________ *** CID 1592269: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/rgw/rgw_aio.cc: 94 in _ZN3rgw11_GLOBAL__N_12aio_abstractIN8librados7v14_2_020ObjectWriteOperationEEEN3fu27abi_3106detail8functionINS7_6configILb1ELb0ELm16EEENS7_8propertyILb1ELb0EJFvPNS_3AioERNS_9AioResultEOEEEEEENS3_5IoCtxEOT_RN5boost4asio10io_contextEN5spawn19basic_yield_contextINSN_15executor_binderIPFvvENSN_15any_io_executorEEEEEPN13opentelemetry2v15trace11SpanContextE() 88 }; 89 90 template <typename Op> 91 Aio::OpFunc aio_abstract(librados::IoCtx ctx, Op&& op, 92 boost::asio::io_context& context, 93 spawn::yield_context yield, jspan_context* trace_ctx = nullptr) { >>> CID 1592269: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "yield" is copied in call to copy constructor "spawn::basic_yield_context<boost::asio::executor_binder<void (*)(), boost::asio::any_io_executor> >", when it could be moved instead. 94 return [ctx = std::move(ctx), op = std::move(op), &context, yield, trace_ctx] (Aio* aio, AioResult& r) mutable { 95 // arrange for the completion Handler to run on the yield_context's strand 96 // executor so it can safely call back into Aio without locking 97 using namespace boost::asio; 98 async_completion<spawn::yield_context, void()> init(yield); 99 auto ex = get_associated_executor(init.completion_handler); ** CID 1592268: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/crush/CrushWrapper.h: 1268 in CrushWrapper::add_simple_rule_at(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, std::basic_ostream<char, std::char_traits<char>>*)() ________________________________________________________________________________________________________ *** CID 1592268: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /src/static/src/github/ceph/src/crush/CrushWrapper.h: 1268 in CrushWrapper::add_simple_rule_at(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, std::basic_ostream<char, std::char_traits<char>>*)() 1262 int add_simple_rule_at( 1263 std::string name, std::string root_name, 1264 std::string failure_domain_type, 1265 std::string device_class, std::string mode, 1266 int rule_type, int rno, std::ostream *err = 0) { 1267 return add_simple_rule_at( >>> CID 1592268: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "failure_domain_type" is passed-by-value as parameter to "add_simple_rule_at" when it could be moved instead. 1268 name, root_name, failure_domain_type, -1, 1269 device_class, mode, rule_type, rno, err); 1270 } 1271 1272 int add_multi_osd_per_failure_domain_rule_at( 1273 std::string name, std::string root_name, std::string failure_domain_type, ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yojIR8ODHcGVd1JcCGjvdH5y4fWRBfYFtGznfDs0k2eCA-3D-3DS9sE_AFEUYrrk4DhDarjaCpYCXIJyVJEGfUFHM3ZJDhhIpAafTpaG2vIuBiCWSbxKwkln4MYyzbBPdXu9UlHKDtyr9DZsWXDnBNQB-2FDkzbhqdYUGgREaz1W4V0zoF6UQUqoK88-2FP8MLYcwi711bIaqXjWAfIex-2FHSFGD3KCQS0-2F838-2BkOTubTRNF4bFI8OL4H0boH _______________________________________________ Dev mailing list -- dev@xxxxxxx To unsubscribe send an email to dev-leave@xxxxxxx