]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test_cors.cc: init non-static members in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 17 Jun 2015 09:44:39 +0000 (11:44 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 17 Jul 2015 08:50:45 +0000 (10:50 +0200)
Fix for:

CID 1019635 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
 uninit_member: Non-static class member curl_inst is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member resp_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/test/test_cors.cc

index 4d385bc037e94caf90dc5fd66fc004538b07b7d0..20cdeadd3cbbd0914781224ede03122da1f393ff 100644 (file)
@@ -66,7 +66,7 @@ class test_cors_helper {
     unsigned resp_code;
     key_type kt;
   public:
-    test_cors_helper() : resp_data(NULL), kt(KEY_TYPE_UNDEFINED){
+    test_cors_helper() : curl_inst(NULL), resp_data(NULL), resp_code(0), kt(KEY_TYPE_UNDEFINED){
       curl_global_init(CURL_GLOBAL_ALL);
     }
     ~test_cors_helper(){