From: Pawel Andruszkiewicz
Date: Mon, 28 Sep 2015 13:29:44 +0000 (+0200)
Subject: Fixed INIT-06 errors detected by C++Test.
X-Git-Tag: submit/tizen/20151026.073646^2^2~71
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da7c027916be0938177aa068a92c6892ca284d3d;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
Fixed INIT-06 errors detected by C++Test.
Unitialized member variables have been initialized.
[Verification] Code compiles, TCT pass rate of affected modules did not change.
Change-Id: Ie42169f2649909f155b226ecdc8c32200b920c04
Signed-off-by: Pawel Andruszkiewicz
---
diff --git a/src/application/application_manager.cc b/src/application/application_manager.cc
index 65174120..fdbd750d 100755
--- a/src/application/application_manager.cc
+++ b/src/application/application_manager.cc
@@ -1118,7 +1118,7 @@ void ApplicationManager::GetAppMetaData(const std::string& app_id, picojson::obj
class ApplicationListChangedBroker {
public:
- ApplicationListChangedBroker(){}
+ ApplicationListChangedBroker() : event_type_() {}
enum class Event {
kInstalled,
kUpdated,
diff --git a/src/archive/archive_callback_data.cc b/src/archive/archive_callback_data.cc
index 3554349d..dcb210ff 100755
--- a/src/archive/archive_callback_data.cc
+++ b/src/archive/archive_callback_data.cc
@@ -42,7 +42,8 @@ OperationCallbackData::OperationCallbackData(ArchiveCallbackType callback_type,
m_handle(-1),
instance_(instance),
m_is_error(false),
- m_is_canceled(false)
+ m_is_canceled(false),
+ m_err_code(ErrorCode::NO_ERROR)
{
LoggerD("Entered");
}
diff --git a/src/archive/archive_file.cc b/src/archive/archive_file.cc
index e1f6756f..e929740d 100755
--- a/src/archive/archive_file.cc
+++ b/src/archive/archive_file.cc
@@ -52,6 +52,7 @@ PermissionMap ArchiveFile::s_permission_map = {
ArchiveFile::ArchiveFile() :
enable_shared_from_this(),
+ m_file_mode(),
m_decompressed_size(0),
m_is_open(false),
m_overwrite(false),
@@ -64,7 +65,8 @@ ArchiveFile::ArchiveFile(FileMode file_mode) :
enable_shared_from_this(),
m_decompressed_size(0),
m_is_open(false),
- m_overwrite(false)
+ m_overwrite(false),
+ m_created_as_new_empty_archive(false)
{
LoggerD("Enter");
m_file_mode = file_mode;
diff --git a/src/archive/un_zip.cc b/src/archive/un_zip.cc
index 5ce5ddd0..cc5616c2 100755
--- a/src/archive/un_zip.cc
+++ b/src/archive/un_zip.cc
@@ -40,7 +40,8 @@ using namespace common;
UnZip::UnZip(const std::string& filename) :
m_zipfile_name(filename),
m_unzip(NULL),
- m_default_buffer_size(1024 * 1024)
+ m_default_buffer_size(1024 * 1024),
+ m_is_open(false)
{
LoggerD("Entered");
m_unzip = unzOpen(filename.c_str());
diff --git a/src/archive/un_zip_extract_request.cc b/src/archive/un_zip_extract_request.cc
index df320dd9..b3018da4 100755
--- a/src/archive/un_zip_extract_request.cc
+++ b/src/archive/un_zip_extract_request.cc
@@ -164,6 +164,7 @@ UnZipExtractRequest::UnZipExtractRequest(UnZip& owner,
m_is_directory_entry(false)
{
LoggerD("Enter");
+ m_filename_inzip[0] = '\0';
}
PlatformResult UnZipExtractRequest::run()
diff --git a/src/archive/zip.cc b/src/archive/zip.cc
index 251c2dd3..8d82e900 100755
--- a/src/archive/zip.cc
+++ b/src/archive/zip.cc
@@ -70,7 +70,8 @@ void Zip::generateZipFileInfo(const std::string& filename, zip_fileinfo& out_zi)
Zip::Zip(const std::string& filename, ZipOpenMode open_mode) :
m_zipfile_name(filename),
m_zip(NULL),
- m_default_buffer_size(1024 * 1024)
+ m_default_buffer_size(1024 * 1024),
+ m_is_open(false)
{
LoggerD("Entered");
diff --git a/src/bluetooth/bluetooth_adapter.cc b/src/bluetooth/bluetooth_adapter.cc
index 84a82de7..de2679fb 100755
--- a/src/bluetooth/bluetooth_adapter.cc
+++ b/src/bluetooth/bluetooth_adapter.cc
@@ -349,6 +349,7 @@ BluetoothAdapter::BluetoothAdapter(BluetoothInstance& instance) :
user_request_list_(),
user_request_callback_(),
requested_powered_(),
+ requested_visibility_(),
instance_(instance)
{
LoggerD("Entered");
diff --git a/src/mediakey/mediakey_manager.cc b/src/mediakey/mediakey_manager.cc
index e91105d9..29ee1e02 100755
--- a/src/mediakey/mediakey_manager.cc
+++ b/src/mediakey/mediakey_manager.cc
@@ -33,7 +33,8 @@ MediaKeyManager& MediaKeyManager::GetInstance() {
}
MediaKeyManager::MediaKeyManager()
- : m_media_key_listener_registered(false) {
+ : m_media_key_listener(nullptr),
+ m_media_key_listener_registered(false) {
LoggerD("Enter");
}
diff --git a/src/messaging/email_manager.cc b/src/messaging/email_manager.cc
index a26c8bc5..2833d993 100755
--- a/src/messaging/email_manager.cc
+++ b/src/messaging/email_manager.cc
@@ -71,7 +71,7 @@ const int ACCOUNT_ID_NOT_INITIALIZED = -1;
const std::string FIND_FOLDERS_ATTRIBUTE_ACCOUNTID_NAME = "serviceId";
} //anonymous namespace
-EmailManager::EmailManager() : m_is_initialized(false)
+EmailManager::EmailManager() : m_slot_size(-1), m_is_initialized(false)
{
LoggerD("Entered");
}
diff --git a/src/messaging/message.cc b/src/messaging/message.cc
index fac18185..129b1c7d 100755
--- a/src/messaging/message.cc
+++ b/src/messaging/message.cc
@@ -43,8 +43,8 @@ using namespace common;
Message::Message():
m_id(-1), m_old_id(-1), m_id_set(false), m_conversation_id(-1),
m_conversation_id_set(false), m_folder_id(-1), m_folder_id_set(false),
- m_type(UNDEFINED), m_timestamp_set(false), m_from_set(false),
- m_body(new(std::nothrow) MessageBody()),
+ m_type(UNDEFINED), m_timestamp(-1), m_timestamp_set(false),
+ m_from_set(false), m_body(new(std::nothrow) MessageBody()),
m_service_id(0), m_is_read(false), m_has_attachment(false),
m_high_priority(false), m_in_response(-1), m_in_response_set(false),
m_service_id_set(false), m_status(STATUS_UNDEFINED),
diff --git a/src/messaging/message_callback_user_data.cc b/src/messaging/message_callback_user_data.cc
index 42ace37c..e5842615 100755
--- a/src/messaging/message_callback_user_data.cc
+++ b/src/messaging/message_callback_user_data.cc
@@ -23,7 +23,8 @@ namespace messaging {
MessageCallbackUserData::MessageCallbackUserData(PostQueue& queue):
common::CallbackUserData(),
m_is_error(false),
- queue_(queue)
+ queue_(queue),
+ m_account_id(-1)
{
LoggerD("Entered");
}
diff --git a/src/messaging/message_conversation.cc b/src/messaging/message_conversation.cc
index afc9eeaf..eb26e3b7 100755
--- a/src/messaging/message_conversation.cc
+++ b/src/messaging/message_conversation.cc
@@ -35,9 +35,11 @@ using namespace tizen;
MessageConversation::MessageConversation():
m_conversation_id(-1),
m_conversation_type(UNDEFINED),
+ m_timestamp(-1),
m_count(0),
m_unread_messages(0),
- m_is_read(false)
+ m_is_read(false),
+ m_last_message_id(-1)
{
LoggerD("Message Conversation constructor.");
}
diff --git a/src/secureelement/secureelement_session.h b/src/secureelement/secureelement_session.h
index 08fddbc7..891380cc 100644
--- a/src/secureelement/secureelement_session.h
+++ b/src/secureelement/secureelement_session.h
@@ -26,7 +26,10 @@ namespace secureelement {
class SESession {
public:
- SESession(smartcard_service_api::Session* session_ptr) : m_session_ptr(session_ptr) {};
+ SESession(smartcard_service_api::Session* session_ptr)
+ : m_session_ptr(session_ptr) {
+ }
+
~SESession() {};
picojson::value openBasicChannel( const picojson::array& v_aid);
picojson::value openLogicalChannel( const picojson::array& v_aid);
@@ -36,7 +39,6 @@ public:
void closeChannels();
private:
smartcard_service_api::Session* m_session_ptr;
- void* m_user_data;
};
} // secureelement
diff --git a/src/sound/sound_manager.cc b/src/sound/sound_manager.cc
index 13ce2db3..c0ef6779 100644
--- a/src/sound/sound_manager.cc
+++ b/src/sound/sound_manager.cc
@@ -118,7 +118,8 @@ std::string SoundManager::SoundIOTypeToString(sound_device_io_direction_e type)
}
SoundManager::SoundManager(SoundInstance& instance)
- : soundModeChangeListening(false),
+ : is_volume_change_listener_(false),
+ soundModeChangeListening(false),
sound_device_change_listener_(false),
instance_(instance),
soundModeListener(nullptr) {