Fix compiler warning in QuickAccess 01/49901/2
authorJanusz Majnert <j.majnert@samsung.com>
Wed, 21 Oct 2015 09:48:38 +0000 (11:48 +0200)
committerJanusz Majnert <j.majnert@samsung.com>
Wed, 21 Oct 2015 14:44:16 +0000 (07:44 -0700)
[Issue]        N/A
[Problem]      Compilation warnings:
                * initialization list ordering in QuickAccess.cpp
                * use of uninitialized variables in GenListManager.cpp
                * unused variable in UrlHistoryList.cpp
[Solution]     Fix ordering, initialize variables with nullptr and remove unused
               variables
[Verification] Build the project and verify that there are no warnings from
               QuickAccess

Change-Id: Ibe7a1363366f7e32b12c713276ce03015cb264bc

services/QuickAccess/QuickAccess.cpp
services/QuickAccess/UrlHistoryList/GenlistManager.cpp
services/QuickAccess/UrlHistoryList/UrlHistoryList.cpp

index 0624b265426adea167ab99879405f03ef5c540e9..9e347307f95c07ffb2e3bf8031570669906a8aff 100644 (file)
@@ -70,10 +70,10 @@ QuickAccess::QuickAccess()
     , m_mostVisitedButton(nullptr)
     , m_bookmarkGengrid(nullptr)
     , m_bookmarkManagerButton(nullptr)
+    , m_after_history_thumb(false)
     , m_parentFocusChain(nullptr)
     , m_bookmark_item_class(nullptr)
     , m_detailPopup(this)
-    , m_after_history_thumb(false)
 {
     BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
     edjFilePath = edjFilePathUrlHistoryList = EDJE_DIR;
index fda4254b63a47d70464c18ca3b5c58a784e3fa1d..7977861f45e35905334f20a3b6e1be8f4d177ea0 100644 (file)
@@ -106,7 +106,7 @@ void GenlistManager::showWidget(const string& editedUrl,
     prepareUrlsVector(editedUrl, matchedEntries);
 
     m_itemUrlFirst = m_itemUrlLast = nullptr;
-    Elm_Object_Item* itemAppended;
+    Elm_Object_Item* itemAppended = nullptr;
     for(auto it : m_readyUrlPairs) {
         itemAppended = elm_genlist_item_append(m_genlist, m_historyItemClass,
                 it.get(), nullptr, ELM_GENLIST_ITEM_NONE, GenlistManagerCallbacks::_item_selected, it.get());
@@ -182,7 +182,7 @@ void GenlistManager::addSpaces()
 {
     if (m_itemUrlLast) {
         m_itemSpaceFirst = m_itemSpaceLast = nullptr;
-        Elm_Object_Item* itemAppended;
+        Elm_Object_Item* itemAppended = nullptr;
         for (auto i = 0; i < HISTORY_ITEMS_VISIBLE_MAX; ++i) {
             // append spaces to the last url item, so they can be easily cleared
             itemAppended = elm_genlist_item_append(m_genlist,
index c6530bc5ddbbf351d1b49d93d29ce3c427a35301..4e18d6be6b53b27972afa73d9c15d811fe930275 100644 (file)
@@ -51,7 +51,7 @@ void UrlHistoryList::createLayout(Evas_Object* parentLayout)
     m_layout = elm_layout_add(parentLayout);
     elm_layout_file_set(m_layout, m_edjFilePath.c_str(), "url_history_list");
 
-    Evas_Object* widgetList = m_genlistListManager->createWidget(m_layout);
+    m_genlistListManager->createWidget(m_layout);
 }
 
 void UrlHistoryList::onURLEntryEditedByUser(const string& editedUrl,