Fix C++Test defects 08/193808/2 accepted/tizen/unified/20181204.063807 submit/tizen/20181204.022314 submit/tizen/20181204.042208
authorDariusz Michaluk <d.michaluk@samsung.com>
Mon, 26 Nov 2018 10:59:29 +0000 (11:59 +0100)
committerDariusz Michaluk <d.michaluk@samsung.com>
Mon, 26 Nov 2018 12:24:40 +0000 (13:24 +0100)
Destructor in a class 'dcm_client_connection' should be public and virtual or protected and nonvirtual
Unreachable code detected after 'switch' statement

Change-Id: I6fe82c3bb231691b693e13f964c8ddc34cf26a78

dcm-client/dcm_client.h
dcm-client/dcm_support.proto
dcm-client/device_certificate_manager.cpp

index bc544e4..2649ba1 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************
  *
- * Copyright 2017 Samsung Electronics All Rights Reserved.
+ * Copyright 2017 - 2018 Samsung Electronics All Rights Reserved.
  *
  * Author: Jaroslaw Pelczar <j.pelczar@samsung.com>
  *
 #define DCM_CLIENT_DCM_CLIENT_H_
 
 #include "device_certificate_manager_export.h"
+
+#include <mbedtls/md.h>
+
 #include <memory>
 #include <vector>
-#include <mbedtls/md.h>
 
 class API_DEVICE_CERTIFICATE_MANAGER_EXPORT dcm_client_connection :
        public std::enable_shared_from_this<dcm_client_connection>
@@ -35,7 +37,7 @@ private:
 
 protected:
        dcm_client_connection() API_DEVICE_CERTIFICATE_MANAGER_NO_EXPORT;
-       virtual ~dcm_client_connection() API_DEVICE_CERTIFICATE_MANAGER_NO_EXPORT;
+       ~dcm_client_connection() API_DEVICE_CERTIFICATE_MANAGER_NO_EXPORT;
 
 public:
        /*!
index 3487971..bc1d860 100644 (file)
@@ -26,7 +26,7 @@ enum MessageDigestType {
 }
 
 message AssociateKeyContext
-{ 
+{
                required string service = 1;
                required string usage = 2;
                required string key_type = 3;
@@ -36,7 +36,7 @@ message AssociateKeyContextResponse
 {
                required int32 result = 1;
                optional uint64 context_cookie = 2;
-               optional CryptoKeyType key_type = 3; 
+               optional CryptoKeyType key_type = 3;
                optional uint32 key_length = 4;
 }
 
@@ -48,7 +48,7 @@ message RequestCertificateChain
 message RequestCertificateChainResponse
 {
                required int32 result = 1;
-               optional bytes cert_chain = 2;          
+               optional bytes cert_chain = 2;
 }
 
 message SignRequest
index 83381ee..73e2ff7 100644 (file)
  *
  ******************************************************************/
 
+#include "device_certificate_manager_export.h"
 #include "device_certificate_manager.h"
 #include "dcm_client.h"
+
 #include <mbedtls/pk_internal.h>
 #include <mbedtls/md.h>
+
 #include <vector>
 #include <cstring>
 
@@ -28,8 +31,6 @@
 #include <dlog.h>
 #endif
 
-#define API_DEVICE_CERTIFICATE_MANAGER_EXPORT __attribute__((visibility("default")))
-
 static mbedtls_md_type_t to_mbedtls_md_type(dcm_digest_algorithm_e md)
 {
   switch(md) {
@@ -55,7 +56,7 @@ static mbedtls_md_type_t to_mbedtls_md_type(dcm_digest_algorithm_e md)
       return MBEDTLS_MD_RIPEMD160;
     default:
       return MBEDTLS_MD_NONE;
-  };
+  }
 }
 
 struct dcm_key_context_internal {