From: Andrzej Popowski Date: Wed, 1 Jul 2015 11:20:57 +0000 (+0200) Subject: [Archive] - Removing warning after adding the compilation option -Wall X-Git-Tag: submit/tizen/20150702.103311^2~1^2~12^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8aa29f07972b536a54e9547e9cf2a6c800ae88de;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Archive] - Removing warning after adding the compilation option -Wall [Verification] - The code compiles without errors Change-Id: I1514dde0138e898ff9b03b83bd81ee2d14eafdd0 Signed-off-by: Andrzej Popowski --- diff --git a/src/archive/archive_callback_data.cc b/src/archive/archive_callback_data.cc index bba7ee81..d57b7b26 100755 --- a/src/archive/archive_callback_data.cc +++ b/src/archive/archive_callback_data.cc @@ -40,9 +40,9 @@ OperationCallbackData::OperationCallbackData(ArchiveCallbackType callback_type, m_op_id(-1), m_cid(-1), m_handle(-1), + instance_(instance), m_is_error(false), - m_is_canceled(false), - instance_(instance) + m_is_canceled(false) { LoggerD("Entered"); } @@ -616,9 +616,9 @@ ExtractAllProgressCallback::ExtractAllProgressCallback(ArchiveInstance& instance BaseProgressCallback(EXTRACT_ALL_PROGRESS_CALLBACK, instance), m_files_to_extract(0), m_expected_decompressed_size(0), - m_files_extracted(0), m_current_file_size(0), m_current_file_extracted_bytes(0), + m_files_extracted(0), m_progress_overall(0), m_overall_decompressed(0) { diff --git a/src/archive/archive_manager.cc b/src/archive/archive_manager.cc index 1eb432e2..97a9998c 100755 --- a/src/archive/archive_manager.cc +++ b/src/archive/archive_manager.cc @@ -52,7 +52,7 @@ void ArchiveManager::abort(long operation_id) std::lock_guard lock(archive_file_ptr->m_mutex); std::size_t size = archive_file_ptr->m_task_queue.size(); - for(int i = 0; i < size; ++i){ + for(std::size_t i = 0; i < size; ++i){ if(operation_id == archive_file_ptr->m_task_queue[i].first){ archive_file_ptr->m_task_queue[i].second->setIsCanceled(true); return; diff --git a/src/archive/archive_utils.cc b/src/archive/archive_utils.cc index c88a4b24..1ce2c703 100755 --- a/src/archive/archive_utils.cc +++ b/src/archive/archive_utils.cc @@ -134,13 +134,13 @@ void getBasePathAndName(const std::string& filepath, size_t name_end_index = filepath_len; size_t name_start_index = 0; - for(int i = filepath_len - 1; i >= 0; --i) { + for(int i = static_cast(filepath_len) - 1; i >= 0; --i) { const char& cur = filepath[i]; if(cur == '/' || cur == '\\') { - if( (filepath_len-1) == i ) { - name_end_index = i; + if((static_cast(filepath_len)-1) == i) { + name_end_index = static_cast(i); } else { - name_start_index = i+1; + name_start_index = static_cast(i) + 1; out_name = filepath.substr(name_start_index, name_end_index - name_start_index);