]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/librgw_file_xattr.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / test / librgw_file_xattr.cc
index 0cf40471027810cdd79527b009e330b635a96f48..13c75becc2e0cf276f6ed3742526616df702f869 100644 (file)
@@ -35,6 +35,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 namespace {
 
   using namespace rgw;
@@ -93,7 +95,7 @@ namespace {
     friend ostream& operator<<(ostream& os, const obj_rec& rec);
   };
 
-  ostream& operator<<(ostream& os, const obj_rec& rec)
+  [[maybe_unused]] ostream& operator<<(ostream& os, const obj_rec& rec)
   {
     RGWFileHandle* rgw_fh = rec.rgw_fh;
     if (rgw_fh) {
@@ -369,14 +371,10 @@ TEST(LibRGW, SHUTDOWN) {
 
 int main(int argc, char *argv[])
 {
-  char *v{nullptr};
-  string val;
-  vector<const char*> args;
-
-  argv_to_vec(argc, const_cast<const char**>(argv), args);
+  auto args = argv_to_vec(argc, argv);
   env_to_vec(args);
 
-  v = getenv("AWS_ACCESS_KEY_ID");
+  char* v = getenv("AWS_ACCESS_KEY_ID");
   if (v) {
     access_key = v;
   }
@@ -386,6 +384,7 @@ int main(int argc, char *argv[])
     secret_key = v;
   }
 
+  string val;
   for (auto arg_iter = args.begin(); arg_iter != args.end();) {
     if (ceph_argparse_witharg(args, arg_iter, &val, "--access",
                              (char*) nullptr)) {