]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include/types.h: init members in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 23 Feb 2016 10:59:53 +0000 (11:59 +0100)
committerSage Weil <sage@redhat.com>
Wed, 9 Nov 2016 19:45:22 +0000 (14:45 -0500)
CID 1351708 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member code is not initialized
  in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/include/types.h

index 663430eab99059554a40f2f44716d560e6b6d225..38f7515326faa1dc31a9b18f8ff9748d604ad9fd 100644 (file)
@@ -460,7 +460,7 @@ __s32  ceph_to_host_errno(__s32 e);
 struct errorcode32_t {
   int32_t code;
 
-  errorcode32_t() {}
+  errorcode32_t() : code(0) {}
   // cppcheck-suppress noExplicitConstructor
   errorcode32_t(int32_t i) : code(i) {}