From 949f24d56027a49fba01db234a39907ee8fc8465 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 30 Dec 2011 14:18:40 -0800 Subject: [PATCH] rgw: create default constructors for some structs this will silence valgrind a bit --- src/rgw/rgw_cache.h | 4 ++++ src/rgw/rgw_common.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/rgw/rgw_cache.h b/src/rgw/rgw_cache.h index ea0b6537f08..fdfbe024ed5 100644 --- a/src/rgw/rgw_cache.h +++ b/src/rgw/rgw_cache.h @@ -21,6 +21,8 @@ struct ObjectMetaInfo { uint64_t size; time_t mtime; + ObjectMetaInfo() : size(0), mtime(0) {} + void encode(bufferlist& bl) const { __u8 struct_v = 1; ::encode(struct_v, bl); @@ -76,6 +78,8 @@ struct RGWCacheNotifyInfo { off_t ofs; string ns; + RGWCacheNotifyInfo() : op(0), ofs(0) {} + void encode(bufferlist& obl) const { __u8 struct_v = 1; ::encode(struct_v, obl); diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index 7aff456bf04..8d6ac395f26 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -600,6 +600,8 @@ struct RGWBucketEnt { time_t mtime; uint64_t count; + RGWBucketEnt() : size(0), size_rounded(0), mtime(0), count(0) {} + void encode(bufferlist& bl) const { __u8 struct_v = 4; ::encode(struct_v, bl);