summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShuhrat Dehkanov <sh.dehkanov@samsung.com>2015-05-07 15:34:15 +0900
committerShuhrat Dehkanov <sh.dehkanov@samsung.com>2015-05-07 15:38:14 +0900
commit46bdd5af7cf1ab5155b185a27b730d44c0f6dcee (patch)
tree755bac640c828549f90d1e0036c91c362ed9b98d /src
parentddc19f81b8d95f7069b387cc646364df2f06ff79 (diff)
downloadsettings-46bdd5af7cf1ab5155b185a27b730d44c0f6dcee.tar.gz
settings-46bdd5af7cf1ab5155b185a27b730d44c0f6dcee.tar.bz2
settings-46bdd5af7cf1ab5155b185a27b730d44c0f6dcee.zip
Fix compile warnings
/home/abuild/rpmbuild/BUILD/org.tizen.settings-tv-ref-0.1/ug/wifi-direct/src/WifiDirectMainView.cpp: In member function 'void CWifiDirectMainView::m_ProcessConnectionReq(const char*)': /home/abuild/rpmbuild/BUILD/org.tizen.settings-tv-ref-0.1/ug/wifi-direct/src/WifiDirectMainView.cpp: 763:45: warning: the address of 'is_pbc' will always evaluate as 'true' [-Waddress] ret = m->pWifiDirectMgr->GetWPStype(&is_pbc); ^ /home/abuild/rpmbuild/BUILD/org.tizen.settings-tv-ref-0.1/src/view_maincatalog.cpp: In member function 'virtual void CMainCatalogView::Refresh()': /usr/include/eina-1/eina/eina_array.h:493:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (index < eina_array_count(array)) && ((item = *((iterator)++))); \ ^ /home/abuild/rpmbuild/BUILD/org.tizen.settings-tv-ref-0.1/src/view_maincatalog.cpp:1188:3: note: in expansion of macro 'EINA_ARRAY_ITER_NEXT' EINA_ARRAY_ITER_NEXT(m->sub_item_btn, i, obj, a) { ^ /home/abuild/rpmbuild/BUILD/org.tizen.settings-tv-ref-0.1/src/view_sublist.cpp: In member function 'bool CSublistView::m_DrawListItems(Eina_List*)': /usr/include/eina-1/eina/eina_array.h:493:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (index < eina_array_count(array)) && ((item = *((iterator)++))); \ ^ /home/abuild/rpmbuild/BUILD/org.tizen.settings-tv-ref-0.1/src/view_sublist.cpp:359:4: note: in expansion of macro 'EINA_ARRAY_ITER_NEXT' EINA_ARRAY_ITER_NEXT(btns, j, obj, a) ^ /home/abuild/rpmbuild/BUILD/org.tizen.settings-tv-ref-0.1/src/view_pwd_popup.cpp: In function 'Evas_Object* _add_pwd_cancel_btn(SPasscodePopupView*)': /home/abuild/rpmbuild/BUILD/org.tizen.settings-tv-ref-0.1/src/view_pwd_popup.cpp:196:63: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] utils_get_translation_str((char *) MSGID_CANCEL), EINA_TRUE); ^ /home/abuild/rpmbuild/BUILD/org.tizen.settings-tv-ref-0.1/src/view_system_clock.cpp: In member function 'bool CSystemClockView::m_AddSysclkSublistItem(Eina_List*, const char*)': /usr/include/eina-1/eina/eina_array.h:493:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (index < eina_array_count(array)) && ((item = *((iterator)++))); \ ^ /home/abuild/rpmbuild/BUILD/org.tizen.settings-tv-ref-0.1/src/view_system_clock.cpp:257:2: note: in expansion of macro 'EINA_ARRAY_ITER_NEXT' EINA_ARRAY_ITER_NEXT(array, j, obj, aiter) { ^ Change-Id: Ia11848ec772103e14d5fb5d5d40ac37b65058afb
Diffstat (limited to 'src')
-rw-r--r--src/utils.cpp3
-rw-r--r--src/view_maincatalog.cpp7
-rw-r--r--src/view_need_pwd.cpp4
-rw-r--r--src/view_pwd_popup.cpp3
-rw-r--r--src/view_sublist.cpp4
-rw-r--r--src/view_system_clock.cpp4
6 files changed, 10 insertions, 15 deletions
diff --git a/src/utils.cpp b/src/utils.cpp
index d376f00..da5ab94 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -126,8 +126,7 @@ char *utils_get_translation_str(const char *msgid)
* callback or not.
* @return The button's evas object, NULL on error.
*/
-Evas_Object *utils_add_btn(Evas_Object *base,
- char *style, const char *text, Eina_Bool event)
+Evas_Object *utils_add_btn(Evas_Object *base, const char *style, const char *text, Eina_Bool event)
{
Evas_Object *btn;
diff --git a/src/view_maincatalog.cpp b/src/view_maincatalog.cpp
index a2114f7..de8c4f8 100644
--- a/src/view_maincatalog.cpp
+++ b/src/view_maincatalog.cpp
@@ -656,8 +656,7 @@ bool CMainCatalogView::m_DrawSubItems(const char *name)
EINA_LIST_FOREACH(list, l, obj) {
item = (struct settingitem *) obj;
- btn = utils_add_btn(m->base, (char *)SUBITEMBTN_STYLE,
- settingitem_get_display_name(item), EINA_FALSE);
+ btn = utils_add_btn(m->base, SUBITEMBTN_STYLE, settingitem_get_display_name(item), EINA_FALSE);
if (!btn) {
_ERR("Add btn failed");
evas_object_del(m->subitem_box);
@@ -810,7 +809,7 @@ bool CMainCatalogView::m_AddIconBtns(Eina_List *list)
}
for (int i = 0; i < m->main_item_count; i++) {
- btn = utils_add_btn(m->base, (char *)MAINICONBTN_STYLE, NULL, EINA_FALSE);
+ btn = utils_add_btn(m->base, MAINICONBTN_STYLE, NULL, EINA_FALSE);
if (!btn) {
_ERR("Add btn failed");
return false;
@@ -1177,7 +1176,7 @@ void CMainCatalogView::Refresh(void)
char *sld;
const char *id;
- int i;
+ unsigned int i;
struct settingitem *item;
Eina_Array_Iterator a;
Evas_Object *btn, *pb, *icon;
diff --git a/src/view_need_pwd.cpp b/src/view_need_pwd.cpp
index ef51729..dfa6fca 100644
--- a/src/view_need_pwd.cpp
+++ b/src/view_need_pwd.cpp
@@ -189,9 +189,7 @@ static Evas_Object *_add_view_cancel_btn(SNeedPasscodeView *data)
if (!data || !data->base)
return NULL;
- btn = utils_add_btn(data->base, (char *)PWD_BASIC_BTN,
- utils_get_translation_str((char *)MSGID_CANCEL),
- EINA_TRUE);
+ btn = utils_add_btn(data->base, PWD_BASIC_BTN, MSGID_CANCEL, EINA_TRUE);
if (!btn) {
_ERR("utils add button failed.");
return NULL;
diff --git a/src/view_pwd_popup.cpp b/src/view_pwd_popup.cpp
index ac78c3a..1ba5d15 100644
--- a/src/view_pwd_popup.cpp
+++ b/src/view_pwd_popup.cpp
@@ -192,8 +192,7 @@ static Evas_Object *_add_pwd_cancel_btn(SPasscodePopupView *data)
if (!data || !data->base)
return NULL;
- btn = utils_add_btn(data->base, PWD_BASIC_BTN,
- utils_get_translation_str((char *) MSGID_CANCEL), EINA_TRUE);
+ btn = utils_add_btn(data->base, PWD_BASIC_BTN, MSGID_CANCEL, EINA_TRUE);
if (!btn) {
_ERR("utils add button failed.");
return NULL;
diff --git a/src/view_sublist.cpp b/src/view_sublist.cpp
index 19b827b..52f14ed 100644
--- a/src/view_sublist.cpp
+++ b/src/view_sublist.cpp
@@ -325,7 +325,7 @@ bool CSublistView::m_DrawListItems(Eina_List *list)
Evas_Object *btn, *tmp;
char *sel;
const char *name, *val;
- int check, i, j;
+ unsigned int check, i, j;
if (!list || !m->popup_box) {
_ERR("Invalid argument");
@@ -353,7 +353,7 @@ bool CSublistView::m_DrawListItems(Eina_List *list)
ldata = (struct listitem *) obj;
name = listitem_get_display_name(ldata);
- btn = utils_add_btn(m->popup_box, (char *) CTXPOPUPBTN_STYLE, name, EINA_TRUE);
+ btn = utils_add_btn(m->popup_box, CTXPOPUPBTN_STYLE, name, EINA_TRUE);
if (!btn) {
_ERR("Add button failed");
EINA_ARRAY_ITER_NEXT(btns, j, obj, a)
diff --git a/src/view_system_clock.cpp b/src/view_system_clock.cpp
index 3f08dd4..ecab021 100644
--- a/src/view_system_clock.cpp
+++ b/src/view_system_clock.cpp
@@ -183,7 +183,7 @@ bool CSystemClockView::m_AddSysclkSublistItem(Eina_List *list, const char *selva
void* obj;
Eina_List *iter;
const char *disp, *value;
- int idx, i, j;
+ unsigned int idx, i, j;
if (!list || !m->ctxpopup || !selval) {
_ERR("invalid arguments.");
@@ -216,7 +216,7 @@ bool CSystemClockView::m_AddSysclkSublistItem(Eina_List *list, const char *selva
goto error;
}
- btn = utils_add_btn(box, (char *) CTXPOPUPBTN_STYLE, disp, EINA_TRUE);
+ btn = utils_add_btn(box, CTXPOPUPBTN_STYLE, disp, EINA_TRUE);
if (!btn) {
_ERR("utils add button failed.");
goto error;