]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: encoding: silence warning
authorSage Weil <sage.weil@dreamhost.com>
Mon, 30 Jan 2012 05:05:08 +0000 (21:05 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Mon, 30 Jan 2012 05:08:02 +0000 (21:08 -0800)
This is cheating, but we always use this class with int types, so it makes
this go away:

warning: test/encoding.cc:79:20: ‘*((void*)(& tu)+4).ConstructorCounter::data’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/test/encoding.cc

index 225e3312fd684efcf71d0cc7de935f93cbc34a34..2662c240eaaf77bccd0a8cd939162aaaaa3cbab7 100644 (file)
@@ -64,7 +64,7 @@ template <typename T>
 class ConstructorCounter
 {
 public:
-  ConstructorCounter()
+  ConstructorCounter() : data(0)
   {
     default_ctor++;
   }