From 7fd115737166fe25a6281a1086c357408b8feea9 Mon Sep 17 00:00:00 2001 From: cookie Date: Wed, 15 Jan 2020 05:34:20 -0500 Subject: Fix Toolchain(GCC-9) Change-Id: I76c2a4754add976c08357d7689611acdc5742c83 Signed-off-by: cookie --- core/AbstractWebEngine/WebConfirmation.cpp | 2 ++ core/BrowserLogger.h | 2 +- core/Logger/LoggerTools.cpp | 4 ++-- core/Tools/BookmarkItem.cpp | 2 ++ core/Tools/EflTools.cpp | 2 +- services/BookmarkFlowUI/BookmarkFlowUI.cpp | 2 ++ services/BookmarkManagerUI/BookmarkManagerUI.cpp | 3 +++ services/CertificateService/CertificateContents.cpp | 3 +++ services/HistoryService/HistoryItem.cpp | 6 ++++++ .../HistoryUI/HistoryDaysListManager/mob/HistoryDayItemMob.cpp | 2 ++ .../mob/WebsiteHistoryItem/WebsiteHistoryItemTitleMob.cpp | 2 ++ .../tv/WebsiteHistoryItem/WebsiteHistoryItemTitleTv.cpp | 2 ++ services/MoreMenuUI/MoreMenuUI.cpp | 2 ++ services/QuickAccess/QuickAccess.cpp | 3 +++ services/StorageService/Field.cpp | 10 +++++++++- services/TabUI/TabUI.cpp | 2 ++ services/WebEngineService/WebEngineService.cpp | 4 ++-- services/WebEngineService/WebView.cpp | 4 +++- 18 files changed, 49 insertions(+), 8 deletions(-) diff --git a/core/AbstractWebEngine/WebConfirmation.cpp b/core/AbstractWebEngine/WebConfirmation.cpp index 6d446f74..99f5cef7 100644 --- a/core/AbstractWebEngine/WebConfirmation.cpp +++ b/core/AbstractWebEngine/WebConfirmation.cpp @@ -36,6 +36,7 @@ WebConfirmation::WebConfirmation(ConfirmationType type, TabId tabId, const std:: , m_tabId(tabId) , m_uri(uri) , m_message(msg) + , m_result(None) { } @@ -45,6 +46,7 @@ WebConfirmation::~WebConfirmation() CertificateConfirmation::CertificateConfirmation(TabId tabId, const std::string & uri, const std::string & msg) : WebConfirmation(ConfirmationType::CertificateConfirmation, tabId, uri, msg) + , m_data(nullptr) { } diff --git a/core/BrowserLogger.h b/core/BrowserLogger.h index ba620f62..20692c5a 100644 --- a/core/BrowserLogger.h +++ b/core/BrowserLogger.h @@ -20,7 +20,7 @@ #include "browser_config.h" #include -#if !defined(NDEBUG) || PLATFORM(TIZEN) +#ifdef NDEBUG #include "Logger/Logger.h" diff --git a/core/Logger/LoggerTools.cpp b/core/Logger/LoggerTools.cpp index ce112750..5c33738c 100644 --- a/core/Logger/LoggerTools.cpp +++ b/core/Logger/LoggerTools.cpp @@ -36,7 +36,7 @@ std::string make_message(const char *fmt, ...) try { p = new char[size]; - } catch (std::bad_alloc) { + } catch (std::bad_alloc& e) { Logger::getInstance().log("Error while allocating memory!!"); return std::string(); } @@ -68,7 +68,7 @@ std::string make_message(const char *fmt, ...) std::copy(p, p + old_size, np); delete [] p; p = np; - } catch (std::bad_alloc) { + } catch (std::bad_alloc& e) { delete [] p; Logger::getInstance().log("Error while allocating memory!!"); return std::string(); diff --git a/core/Tools/BookmarkItem.cpp b/core/Tools/BookmarkItem.cpp index c801ad98..441cc255 100644 --- a/core/Tools/BookmarkItem.cpp +++ b/core/Tools/BookmarkItem.cpp @@ -54,6 +54,8 @@ BookmarkItem::BookmarkItem( , m_title(title) , m_note(note) , m_directory(dir) +, m_is_folder(false) +, m_is_editable(true) { } diff --git a/core/Tools/EflTools.cpp b/core/Tools/EflTools.cpp index 2e3dad2e..5f10dbfe 100644 --- a/core/Tools/EflTools.cpp +++ b/core/Tools/EflTools.cpp @@ -42,7 +42,7 @@ std::unique_ptr getBlobPNG(std::shared_ptr browserImage) } std::unique_ptr image(new Blob(mem_buffer, length)); - return std::move(image); + return image; } void* getBlobPNG(int width, int height, void* image_data, unsigned long long* length) diff --git a/services/BookmarkFlowUI/BookmarkFlowUI.cpp b/services/BookmarkFlowUI/BookmarkFlowUI.cpp index 138afeba..79179370 100755 --- a/services/BookmarkFlowUI/BookmarkFlowUI.cpp +++ b/services/BookmarkFlowUI/BookmarkFlowUI.cpp @@ -42,6 +42,8 @@ BookmarkFlowUI::BookmarkFlowUI() : m_parent(nullptr) , m_layout(nullptr) , m_title_area(nullptr) + , m_state(false) + , m_all_folder_id(0) #if PROFILE_MOBILE , m_contents_area(nullptr) , m_remove_button(nullptr) diff --git a/services/BookmarkManagerUI/BookmarkManagerUI.cpp b/services/BookmarkManagerUI/BookmarkManagerUI.cpp index 031cb80b..f0b49aaf 100644 --- a/services/BookmarkManagerUI/BookmarkManagerUI.cpp +++ b/services/BookmarkManagerUI/BookmarkManagerUI.cpp @@ -52,6 +52,9 @@ BookmarkManagerUI::BookmarkManagerUI() , m_folder_all_item_class(nullptr) , m_folder_mobile_item_class(nullptr) , m_folder_custom_item_class(nullptr) + , m_all_folder_id(1) + , m_special_folder_id(1) + { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); m_edjFilePath = EDJE_DIR; diff --git a/services/CertificateService/CertificateContents.cpp b/services/CertificateService/CertificateContents.cpp index 4a33fb37..bcbf84b0 100644 --- a/services/CertificateService/CertificateContents.cpp +++ b/services/CertificateService/CertificateContents.cpp @@ -57,7 +57,10 @@ EXPORT_SERVICE(CertificateContents, "org.tizen.browser.certificateservice") CertificateContents::CertificateContents() : m_mainLayout(nullptr) + , m_genlist(nullptr) , m_parent(nullptr) + , m_certificate(nullptr) + , m_hostType(HOST_TYPE::HOST_ABSENT) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); m_edjFilePath = EDJE_DIR; diff --git a/services/HistoryService/HistoryItem.cpp b/services/HistoryService/HistoryItem.cpp index ec5cbad6..09e67fd3 100644 --- a/services/HistoryService/HistoryItem.cpp +++ b/services/HistoryService/HistoryItem.cpp @@ -23,6 +23,8 @@ namespace services { HistoryItem::HistoryItem(HistoryItem && other) noexcept + : m_primaryKey(0) + , m_visitCounter(0) { try { if (this != &other) { @@ -41,8 +43,10 @@ HistoryItem::HistoryItem(int id, : m_primaryKey(id) , m_url(url) , m_title(title) + , m_visitDate() , m_lastVisit() , m_favIcon(favicon) + , m_visitCounter(0) { if (thumbnail) m_thumbnail = thumbnail; @@ -54,8 +58,10 @@ HistoryItem::HistoryItem(int id, const std::string & url) : m_primaryKey(id) , m_url(url) , m_title() + , m_visitDate() , m_lastVisit() , m_favIcon(std::make_shared()) + , m_visitCounter(0) { } diff --git a/services/HistoryUI/HistoryDaysListManager/mob/HistoryDayItemMob.cpp b/services/HistoryUI/HistoryDaysListManager/mob/HistoryDayItemMob.cpp index 32b3c7d9..624f3150 100644 --- a/services/HistoryUI/HistoryDaysListManager/mob/HistoryDayItemMob.cpp +++ b/services/HistoryUI/HistoryDaysListManager/mob/HistoryDayItemMob.cpp @@ -31,6 +31,8 @@ HistoryDayItemMob::HistoryDayItemMob(HistoryDayItemDataPtr dayItemData) , m_boxMainVertical(nullptr) , m_layoutHeader(nullptr) , m_boxHeader(nullptr) + , m_layoutBoxWebsites(nullptr) + , m_boxWebsites(nullptr) { for (auto& websiteHistoryItemData : dayItemData->websiteHistoryItems) { auto websiteHistoryItem = diff --git a/services/HistoryUI/HistoryDaysListManager/mob/WebsiteHistoryItem/WebsiteHistoryItemTitleMob.cpp b/services/HistoryUI/HistoryDaysListManager/mob/WebsiteHistoryItem/WebsiteHistoryItemTitleMob.cpp index c1d552ec..ec1878ac 100644 --- a/services/HistoryUI/HistoryDaysListManager/mob/WebsiteHistoryItem/WebsiteHistoryItemTitleMob.cpp +++ b/services/HistoryUI/HistoryDaysListManager/mob/WebsiteHistoryItem/WebsiteHistoryItemTitleMob.cpp @@ -29,9 +29,11 @@ WebsiteHistoryItemTitleMob::WebsiteHistoryItemTitleMob( WebsiteHistoryItemDataPtr websiteHistoryItemData) : m_websiteHistoryItemData(websiteHistoryItemData) , m_buttonSelect(nullptr) + , m_buttonDelete(nullptr) , m_imageFavIcon(nullptr) , m_imageFavIconMask(nullptr) , m_layoutMain(nullptr) + , m_layerGesture(nullptr) , m_boxMain(nullptr) , m_layoutContent(nullptr) , m_layoutButtonDelete(nullptr) diff --git a/services/HistoryUI/HistoryDaysListManager/tv/WebsiteHistoryItem/WebsiteHistoryItemTitleTv.cpp b/services/HistoryUI/HistoryDaysListManager/tv/WebsiteHistoryItem/WebsiteHistoryItemTitleTv.cpp index a0445386..2b41918f 100644 --- a/services/HistoryUI/HistoryDaysListManager/tv/WebsiteHistoryItem/WebsiteHistoryItemTitleTv.cpp +++ b/services/HistoryUI/HistoryDaysListManager/tv/WebsiteHistoryItem/WebsiteHistoryItemTitleTv.cpp @@ -31,9 +31,11 @@ WebsiteHistoryItemTitleTv::WebsiteHistoryItemTitleTv( : m_websiteHistoryItemData(websiteHistoryItemData) , m_buttonSelect(nullptr) , m_imageClear(nullptr) + , m_imageFavIcon(nullptr) , m_layoutMain(nullptr) , m_boxMainHorizontal(nullptr) , m_historyDeleteManager(historyDeleteManager) + { } diff --git a/services/MoreMenuUI/MoreMenuUI.cpp b/services/MoreMenuUI/MoreMenuUI.cpp index d58ea1dc..9c571f52 100755 --- a/services/MoreMenuUI/MoreMenuUI.cpp +++ b/services/MoreMenuUI/MoreMenuUI.cpp @@ -50,7 +50,9 @@ MoreMenuUI::MoreMenuUI() , m_toastPopup(nullptr) , m_icon(nullptr) , m_bookmarkIcon(nullptr) + , m_bookmarkButton(nullptr) , m_item_class(nullptr) + , m_gengridSetup(true) , m_desktopMode(true) #if PROFILE_MOBILE , m_shouldShowFindOnPage(false) diff --git a/services/QuickAccess/QuickAccess.cpp b/services/QuickAccess/QuickAccess.cpp index 1823e2c5..abaf87fa 100644 --- a/services/QuickAccess/QuickAccess.cpp +++ b/services/QuickAccess/QuickAccess.cpp @@ -75,6 +75,9 @@ QuickAccess::QuickAccess() , m_currPage(QuickAccess::MOST_VISITED_PAGE) , m_bookmark_item_class(nullptr) , m_detailPopup(this) + , m_gengridSetup(false) + , m_desktopMode(true) + #if PROFILE_MOBILE , m_index(nullptr) , m_verticalScroller(nullptr) diff --git a/services/StorageService/Field.cpp b/services/StorageService/Field.cpp index 912235c0..6aed04af 100644 --- a/services/StorageService/Field.cpp +++ b/services/StorageService/Field.cpp @@ -35,8 +35,10 @@ Field::Field() , sqlDouble(f.getDouble()) { } -/*private*/Field & Field::operator=(const Field &) +/*private*/Field & Field::operator=(const Field & f) { + this->sqlInt = f.sqlInt; + this->sqlDouble = f.sqlDouble; return *this; } @@ -55,12 +57,18 @@ Field::Field(double sqlDouble) } Field::Field(const std::string & sqlText) + : type(SQLITE3_TEXT) + , sqlInt(0) + , sqlDouble(0) { this->sqlText = sqlText; this->type = SQLITE3_TEXT; } Field::Field(std::shared_ptr blob) + : type(SQLITE_BLOB) + , sqlInt(0) + , sqlDouble(0) { this->blob = blob; this->type = SQLITE_BLOB; diff --git a/services/TabUI/TabUI.cpp b/services/TabUI/TabUI.cpp index 1c9871a1..ceadc878 100644 --- a/services/TabUI/TabUI.cpp +++ b/services/TabUI/TabUI.cpp @@ -41,10 +41,12 @@ TabUI::TabUI() : m_button_left(nullptr) , m_button_right(nullptr) , m_tab_layout(nullptr) + , m_gengrid_layout(nullptr) , m_gengrid(nullptr) , m_parent(nullptr) , m_itemToShow(nullptr) , m_timer(nullptr) + , editMode(false) , m_item_class(nullptr) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); diff --git a/services/WebEngineService/WebEngineService.cpp b/services/WebEngineService/WebEngineService.cpp index 1133884a..0eeb84ea 100755 --- a/services/WebEngineService/WebEngineService.cpp +++ b/services/WebEngineService/WebEngineService.cpp @@ -559,7 +559,7 @@ bool WebEngineService::switchToTab(tizen_browser::basic_webengine::TabId newTabI closeFindOnPage(); #endif m_currentWebView = m_tabs[newTabId]; - m_currentTabId = newTabId; + m_currentTabId == newTabId; m_mostRecentTab.erase(std::remove(m_mostRecentTab.begin(), m_mostRecentTab.end(), newTabId), m_mostRecentTab.end()); m_mostRecentTab.push_back(newTabId); @@ -601,7 +601,7 @@ bool WebEngineService::closeTab(TabId id) { m_currentWebView.reset(); } if (m_tabs.size() == 0) { - m_currentTabId = TabId::NONE; + m_currentTabId == TabId::NONE; } else if (closingTabId == m_currentTabId && m_mostRecentTab.size()){ res = switchToTab(m_mostRecentTab.back()); diff --git a/services/WebEngineService/WebView.cpp b/services/WebEngineService/WebView.cpp index d642476e..104e4f12 100755 --- a/services/WebEngineService/WebView.cpp +++ b/services/WebEngineService/WebView.cpp @@ -85,7 +85,9 @@ WebView::WebView(Evas_Object * obj, TabId tabId, const std::string& title, bool , m_title(title) , m_redirectedURL("") , m_isLoading(false) + , m_loadProgress(0) , m_loadError(false) + , m_desktopMode(true) , m_suspended(false) , m_private(incognitoMode) , m_fullscreen(false) @@ -874,7 +876,7 @@ void WebView::__newWindowRequest(void *data, Evas_Object *, void *out) /// \todo: Choose newly created tab. TabId id(TabId::NONE); TabId currentTabId = m_webEngine->currentTabId(); - if (currentTabId != (id = m_webEngine->addTab(std::string(), + if (currentTabId != (id == m_webEngine->addTab(std::string(), &self->getTabId(), boost::none, std::string(), -- cgit v1.2.3