Fix compiler warning in HistoryUI 96/49896/3 accepted/tizen/tv/20151022.010509 submit/tizen_tv/20151021.224955
authorJanusz Majnert <j.majnert@samsung.com>
Wed, 21 Oct 2015 08:35:54 +0000 (10:35 +0200)
committerJanusz Majnert <j.majnert@samsung.com>
Wed, 21 Oct 2015 14:45:10 +0000 (07:45 -0700)
[Issue]        N/A
[Problem]      Compilation warning about unused variables and no return statement
[Solution]     Remove unused variables, change method return type
[Verification] Build the project and verify that there are no warnings from
               HistoryUI

Also changed one reinterpret_cast into a static_cast.

Change-Id: I83fe252409475ef0918978d1d30560f6ab4f85a7

services/HistoryUI/HistoryUI.cpp
services/HistoryUI/HistoryUI.h

index 094f04c..619d4a1 100644 (file)
@@ -104,7 +104,7 @@ Evas_Object* HistoryUI::getContent()
     return m_history_layout;
 }
 
-Evas_Object* HistoryUI::createHistoryUILayout(Evas_Object* parent)
+void HistoryUI::createHistoryUILayout(Evas_Object* parent)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     elm_theme_extension_add(nullptr, m_edjFilePath.c_str());
@@ -301,10 +301,10 @@ void HistoryUI::clearItems()
     _history_item_data.clear();
 }
 
-void HistoryUI::_history_item_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+void HistoryUI::_history_item_clicked_cb(void *data, Evas_Object*, void*)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    HistoryItemData * itemData = reinterpret_cast<HistoryItemData *>(data);
+    HistoryItemData * itemData = static_cast<HistoryItemData *>(data);
     itemData->historyUI->historyItemClicked(itemData->item);
 }
 
index 859eddc..94579ff 100644 (file)
@@ -53,7 +53,7 @@ public:
     boost::signals2::signal<void (std::shared_ptr<tizen_browser::services::HistoryItem>)> historyDeleteClicked;
 private:
     void clearItems();
-    Evas_Object* createHistoryUILayout(Evas_Object* parent);
+    void createHistoryUILayout(Evas_Object* parent);
     Elm_Gengrid_Item_Class* crateItemClass();
     static char* _grid_text_get(void *data, Evas_Object *obj, const char *part);
     static Evas_Object * _history_grid_content_get(void *data, Evas_Object *obj, const char *part);