diff options
author | anirudha_r.c <anirudha_r.c@samsung.com> | 2016-11-18 11:39:45 +0530 |
---|---|---|
committer | anirudha_r.c <anirudha_r.c@samsung.com> | 2016-11-18 11:39:45 +0530 |
commit | d327ca9215c05d5694ed8dd571dd235115f097f5 (patch) | |
tree | 7e530cdc2cd50870adb9897250a663de40c8a9e7 | |
parent | 7382e837d182e68c5dcddb3f9ffb8100425a35be (diff) | |
download | alarm-d327ca9215c05d5694ed8dd571dd235115f097f5.tar.gz alarm-d327ca9215c05d5694ed8dd571dd235115f097f5.tar.bz2 alarm-d327ca9215c05d5694ed8dd571dd235115f097f5.zip |
[Alarm]Fixed issue error: ‘for’ loop initial declarations are only allowed in C99 or C11 modesubmit/tizen/20161118.061557
Change-Id: Iba1ccb65dda57eaa5dd99970f91bbd2f12eb7899
-rwxr-xr-x | src/data.c | 5 | ||||
-rwxr-xr-x | src/main.c | 14 | ||||
-rwxr-xr-x | src/view.c | 6 |
3 files changed, 16 insertions, 9 deletions
@@ -411,14 +411,15 @@ int find_day_diff(int present_day, int weekly, int saved, int cur, struct tm *cu ALM_INFO(" present day %d ", present_day); Eina_Bool is_selected[7]; int ans = 0; - for (int i = 0; i < 7; i++) { + int i = 0 ; + for (i = 0; i < 7; i++) { if (weekly & (1 << i)) is_selected[i] = 1; else is_selected[i] = 0; } - for (int i = 0; i < 7; i++) + for (i = 0; i < 7; i++) ALM_INFO("days %d ", is_selected[i]); int flag = 0; while (1) { @@ -386,6 +386,7 @@ void populate_genlist() Eina_List *local_data = view_get_local_data(); struct genlist_item_data *gendata = NULL; int loc_count = eina_list_count(local_data); + int i = 0 ; ALM_INFO("populate_genlist %d", loc_count); if (loc_count > 0) { Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); @@ -397,7 +398,7 @@ void populate_genlist() //itc->func.content_get = _gl_icon_get; itc->func.del = _gl_del; if (genlist != NULL) { - for (int i = 0; i < loc_count; i++) { + for (i = 0; i < loc_count; i++) { gendata = (struct genlist_item_data *)eina_list_nth(local_data, i); if (gendata) { ALM_INFO("Going to append"); @@ -998,6 +999,7 @@ static void _edit_screen_layout(Evas_Object *parent, char *layout_file, char *in void update_genlist_first() { _ALM_ENTER_; + int i = 0 ; Evas_Object *genlist = NULL; Evas_Object *nf = NULL; Evas_Object *circle_genlist = NULL; @@ -1039,7 +1041,7 @@ void update_genlist_first() ALM_INFO(" update_genlist last_alarm_id gendata->alarm_id; %d %d ", last_alarm_id , gendata->alarm_id); - for (int i = 0; i < loc_count ; i++) { + for (i = 0; i < loc_count ; i++) { gendata = (struct genlist_item_data *)eina_list_nth(local_data, i); if (last_alarm_id == gendata->alarm_id) { ALM_INFO("reached the focus "); @@ -1061,6 +1063,7 @@ void update_genlist(mode_type e, int type) { _ALM_ENTER_; int last_alarm_id = 0; + int i = 0 ; Evas_Object *genlist = NULL; Evas_Object *nf = NULL; Evas_Object *circle_genlist = NULL; @@ -1112,7 +1115,7 @@ void update_genlist(mode_type e, int type) } ALM_INFO(" update_genlist last_alarm_id %d ", last_alarm_id); - for (int i = 0; i < loc_count ; i++) { + for (i = 0; i < loc_count ; i++) { gendata = (struct genlist_item_data *)eina_list_nth(local_data, i); if (last_alarm_id == gendata->alarm_id) { ALM_INFO("reached the focus "); @@ -1151,11 +1154,12 @@ static void _save_button_pressed(void *data, Evas_Object *obj, void *event_info) ALM_ERR("inside _save_button_pressed"); //view_get_datetime(); ALM_INFO(" CHECKING PRESSED "); + int i = 0 ; #if 0 - for (int i = 0; i < REPEAT_DAY_NUM; i++) + for (i = 0; i < REPEAT_DAY_NUM; i++) ALM_INFO(" CHECKING %d", s_info.is_pressed[i]); #endif - int weekly = 0, i = 0; + int weekly = 0; for (i = 0; i < REPEAT_DAY_NUM; i++) { if (s_info.is_pressed[i] == 1) { weekly |= 1 << i; @@ -272,6 +272,7 @@ char* _gl_text_get(void *data, Evas_Object *obj, const char *part) struct genlist_item_data *gendata = (struct genlist_item_data *)data; int hour = gendata->saved_time.tm_hour; int min = gendata->saved_time.tm_min; + int i = 0; memset(buf, 0, BUF_LEN); if (!strcmp(part, "elm.text")) { if (hour == 0) @@ -332,7 +333,7 @@ char* _gl_text_get(void *data, Evas_Object *obj, const char *part) strncat(buf, "<color=#FFFFE3>Dec</color> ", BUF_LEN); } } else { - for (int i = 0 ; i < 7 ; i++) { + for (i = 0 ; i < 7 ; i++) { if (loc_weekly & (1 << i)) { ALM_INFO(" day selected in genlist"); if (i == 0) { @@ -1041,12 +1042,13 @@ static void go_to_normal_mode_cb(void *data EINA_UNUSED, Evas_Object *obj, void static void _delete_multiple_alarm(void *data, Evas_Object *obj, void *event_info) { _ALM_ENTER_; + int i = 0 ; int select_mode = view_get_is_select_mode(); if (select_mode) { Eina_List *local_data = view_get_local_data(); int loc_count = eina_list_count(local_data); struct genlist_item_data *gendata = NULL; - for (int i = 0 ; i < loc_count ; i++) { + for (i = 0 ; i < loc_count ; i++) { gendata = (struct genlist_item_data *)eina_list_nth(local_data, i); ALM_INFO("populating list main id %d", gendata->alarm_id); if (gendata->select_check_state) |