]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: compile with -Woverloaded-virtual
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 13 Nov 2012 21:06:22 +0000 (13:06 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 13 Nov 2012 21:06:22 +0000 (13:06 -0800)
This will trigger a warning if RGWRados api changes while
RGWCache doesn't.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/Makefile.am
src/rgw/rgw_cache.h
src/rgw/rgw_op.cc
src/rgw/rgw_op.h
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_s3.h
src/rgw/rgw_rest_swift.cc
src/rgw/rgw_rest_swift.h

index 5dcc1fac9a72ea210be288fdf39ed68ce72a20ff..36b55b9f11580f935c18c3d66bd8086ec397c9bc 100644 (file)
@@ -343,7 +343,7 @@ librgw_a_SOURCES =  \
        rgw/rgw_multi_del.cc \
        rgw/rgw_env.cc
 librgw_a_CFLAGS = ${CRYPTO_CFLAGS} ${AM_CFLAGS}
-librgw_a_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
+librgw_a_CXXFLAGS = -Woverloaded-virtual ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
 noinst_LIBRARIES += librgw.a
 
 my_radosgw_ldadd = \
index ecc01c436d74f8b4311e3c785e5941f8416d4539..c2ac64d7b0b5147d170f45839812dd0313024bcc 100644 (file)
@@ -180,7 +180,7 @@ class RGWCache  : public T
     T::finalize_watch();
     T::finalize();
   }
-  int distribute(const string& normal_name, rgw_obj& obj, ObjectCacheInfo& obj_info, int op);
+  int distribute_cache(const string& normal_name, rgw_obj& obj, ObjectCacheInfo& obj_info, int op);
   int watch_cb(int opcode, uint64_t ver, bufferlist& bl);
 public:
   RGWCache() {}
@@ -229,7 +229,7 @@ int RGWCache<T>::delete_obj(void *ctx, rgw_obj& obj)
   cache.remove(name);
 
   ObjectCacheInfo info;
-  distribute(name, obj, info, REMOVE_OBJ);
+  distribute_cache(name, obj, info, REMOVE_OBJ);
 
   return T::delete_obj(ctx, obj);
 }
@@ -298,7 +298,7 @@ int RGWCache<T>::set_attr(void *ctx, rgw_obj& obj, const char *attr_name, buffer
     string name = normal_name(bucket, oid);
     if (ret >= 0) {
       cache.put(name, info);
-      int r = distribute(name, obj, info, UPDATE_OBJ);
+      int r = distribute_cache(name, obj, info, UPDATE_OBJ);
       if (r < 0)
         mydout(0) << "ERROR: failed to distribute cache for " << obj << dendl;
     } else {
@@ -332,7 +332,7 @@ int RGWCache<T>::set_attrs(void *ctx, rgw_obj& obj,
     string name = normal_name(bucket, oid);
     if (ret >= 0) {
       cache.put(name, info);
-      int r = distribute(name, obj, info, UPDATE_OBJ);
+      int r = distribute_cache(name, obj, info, UPDATE_OBJ);
       if (r < 0)
         mydout(0) << "ERROR: failed to distribute cache for " << obj << dendl;
     } else {
@@ -369,7 +369,7 @@ int RGWCache<T>::put_obj_meta(void *ctx, rgw_obj& obj, uint64_t size, time_t *mt
     string name = normal_name(bucket, oid);
     if (ret >= 0) {
       cache.put(name, info);
-      int r = distribute(name, obj, info, UPDATE_OBJ);
+      int r = distribute_cache(name, obj, info, UPDATE_OBJ);
       if (r < 0)
         mydout(0) << "ERROR: failed to distribute cache for " << obj << dendl;
     } else {
@@ -404,7 +404,7 @@ int RGWCache<T>::put_obj_data(void *ctx, rgw_obj& obj, const char *data,
     string name = normal_name(bucket, oid);
     if (ret >= 0) {
       cache.put(name, info);
-      int r = distribute(name, obj, info, UPDATE_OBJ);
+      int r = distribute_cache(name, obj, info, UPDATE_OBJ);
       if (r < 0)
         mydout(0) << "ERROR: failed to distribute cache for " << obj << dendl;
     } else {
@@ -470,7 +470,7 @@ done:
 }
 
 template <class T>
-int RGWCache<T>::distribute(const string& normal_name, rgw_obj& obj, ObjectCacheInfo& obj_info, int op)
+int RGWCache<T>::distribute_cache(const string& normal_name, rgw_obj& obj, ObjectCacheInfo& obj_info, int op)
 {
   RGWCacheNotifyInfo info;
 
index e33be8de261ed6ee22a10b2c897e92a61b877d30..61e373425f7e44241ace6d62b2485d85a597afaf 100644 (file)
@@ -390,7 +390,7 @@ int RGWGetObj::read_user_manifest_part(rgw_bucket& bucket, RGWObjEnt& ent, RGWAc
     ret = 0;
     perfcounter->finc(l_rgw_get_lat,
                       (ceph_clock_now(s->cct) - start_time));
-    send_response(bl);
+    send_response_data(bl);
 
     start_time = ceph_clock_now(s->cct);
   }
@@ -590,7 +590,7 @@ void RGWGetObj::execute()
 
     perfcounter->finc(l_rgw_get_lat,
                      (ceph_clock_now(s->cct) - start_time));
-    ret = send_response(bl);
+    ret = send_response_data(bl);
     bl.clear();
     if (ret < 0) {
       dout(0) << "NOTICE: failed to send response to client" << dendl;
@@ -614,7 +614,7 @@ void RGWGetObj::execute()
   return;
 
 done:
-  send_response(bl);
+  send_response_data(bl);
   store->finish_get_obj(&handle);
 }
 
index eb71c68c55a4effeb893dd1dfad91e5e669e1d78..404c3384ab08a038df083b1b3a8b8867e09473f6 100644 (file)
@@ -108,7 +108,7 @@ public:
   int handle_user_manifest(const char *prefix);
 
   virtual int get_params() = 0;
-  virtual int send_response(bufferlist& bl) = 0;
+  virtual int send_response_data(bufferlist& bl) = 0;
 
   virtual const char *name() { return "get_obj"; }
 };
index 59b15bd7e414863a9b0b54bff32863f73e7b0b50..f3a1675d6fb91213235ba23d89a32d917357e859 100644 (file)
@@ -64,7 +64,7 @@ static struct response_attr_param resp_attr_params[] = {
   {NULL, NULL},
 };
 
-int RGWGetObj_ObjStore_S3::send_response(bufferlist& bl)
+int RGWGetObj_ObjStore_S3::send_response_data(bufferlist& bl)
 {
   const char *content_type = NULL;
   string content_type_str;
index 5bdec1b0e4f4dd1c7e61047981dcacf4a445aaa3..386f159b473ee7fb7a69f28a6b40b1d40558643e 100644 (file)
@@ -16,7 +16,7 @@ public:
   RGWGetObj_ObjStore_S3() {}
   ~RGWGetObj_ObjStore_S3() {}
 
-  int send_response(bufferlist& bl);
+  int send_response_data(bufferlist& bl);
 };
 
 class RGWListBuckets_ObjStore_S3 : public RGWListBuckets_ObjStore {
index 6fefb548e75be981aaaac0dde6d6501ce20fc3c7..13c324a1bd6a6872c398665a4027379161123a59 100644 (file)
@@ -429,7 +429,7 @@ void RGWCopyObj_ObjStore_SWIFT::send_response()
   end_header(s);
 }
 
-int RGWGetObj_ObjStore_SWIFT::send_response(bufferlist& bl)
+int RGWGetObj_ObjStore_SWIFT::send_response_data(bufferlist& bl)
 {
   const char *content_type = NULL;
   int orig_ret = ret;
index 7051fee579e33afc00090af65f4fd4909ff93a4a..1735d151f4483adc8a65523557b7d43a9cc03bf4 100644 (file)
@@ -10,7 +10,7 @@ public:
   RGWGetObj_ObjStore_SWIFT() {}
   ~RGWGetObj_ObjStore_SWIFT() {}
 
-  int send_response(bufferlist& bl);
+  int send_response_data(bufferlist& bl);
 };
 
 class RGWListBuckets_ObjStore_SWIFT : public RGWListBuckets_ObjStore {