From: Ronen Friedman Date: Tue, 7 May 2024 13:20:18 +0000 (+0300) Subject: tests/librados: do not use '0' as a string X-Git-Tag: testing/wip-vshankar-testing-20240515.171252-debug~56^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9722737734bf10c5c9306142565b0d244747cb45;p=ceph-ci.git tests/librados: do not use '0' as a string not even as a default string parameter to a function. C++23 does not allow int-to-string conversions, Signed-off-by: Ronen Friedman --- diff --git a/src/test/librados/tier_cxx.cc b/src/test/librados/tier_cxx.cc index be1d411a910..ecef8bd3642 100644 --- a/src/test/librados/tier_cxx.cc +++ b/src/test/librados/tier_cxx.cc @@ -120,7 +120,7 @@ static inline void buf_to_hex(const unsigned char *buf, int len, char *str) } void check_fp_oid_refcount(librados::IoCtx& ioctx, std::string foid, uint64_t count, - std::string fp_algo = NULL) + std::string fp_algo = std::string{}) { bufferlist t; int size = foid.length(); @@ -148,7 +148,7 @@ void check_fp_oid_refcount(librados::IoCtx& ioctx, std::string foid, uint64_t co ASSERT_LE(count, refs.count()); } -string get_fp_oid(string oid, std::string fp_algo = NULL) +string get_fp_oid(string oid, std::string fp_algo = std::string{}) { if (fp_algo == "sha1") { unsigned char fingerprint[CEPH_CRYPTO_SHA1_DIGESTSIZE + 1];