summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinwang.an <jinwang.an@samsung.com>2017-09-12 14:36:52 +0900
committerjinwang.an <jinwang.an@samsung.com>2017-09-12 14:36:52 +0900
commit4c10bc7eded94a010df3d61e61978c593e5c8645 (patch)
tree003843519e3f517cacfb3ff5c2f0f138f4c76528
parent8c52a131d3429b1f3b44900af24439133d5ccba9 (diff)
downloadwatch-setting-4c10bc7eded94a010df3d61e61978c593e5c8645.tar.gz
watch-setting-4c10bc7eded94a010df3d61e61978c593e5c8645.tar.bz2
watch-setting-4c10bc7eded94a010df3d61e61978c593e5c8645.zip
Remove casting of (pointer to int) and (int to pointer).submit/tizen_4.0/20170912.054221accepted/tizen/4.0/unified/20170912.184434
Change-Id: I31aa84722dc07d27d37b1727e4b93b1b49d7e63a Signed-off-by: jinwang.an <jinwang.an@samsung.com>
-rwxr-xr-xCMakeLists.txt2
-rw-r--r--src/setting-clock.c17
2 files changed, 14 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c8f060..9e27839 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,7 +54,7 @@ SET(FAKE_IMG_PATH "${TZ_SYS_RO_APP}/${PKGNAME}/shared/res")
SET(CHANGEABLE_PATH "${PREFIX}/shared/res/tables")
#ENDIF(FEATURE_SETTING_CHANGEABLE)
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Werror")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast")
IF(FEATURE_SETTING_SDK)
diff --git a/src/setting-clock.c b/src/setting-clock.c
index d703aeb..8efed45 100644
--- a/src/setting-clock.c
+++ b/src/setting-clock.c
@@ -123,6 +123,17 @@ static char *font_size_str[] = {
"IDS_ST_BODY_LARGE_M_FONT_SIZE_ABB2"
};
+static char *bg_path_str[] = {
+ SETTING_HOME_SCREEN_DIR_PATH"/BG_preview_00.png",
+ SETTING_HOME_SCREEN_DIR_PATH"/BG_preview_01.png",
+ SETTING_HOME_SCREEN_DIR_PATH"/BG_preview_02.png",
+ SETTING_HOME_SCREEN_DIR_PATH"/BG_preview_03.png",
+ SETTING_HOME_SCREEN_DIR_PATH"/BG_preview_04.png",
+ SETTING_HOME_SCREEN_DIR_PATH"/BG_preview_05.png",
+ SETTING_HOME_SCREEN_DIR_PATH"/BG_preview_06.png",
+ SETTING_HOME_SCREEN_DIR_PATH"/BG_preview_07.png"
+};
+
enum {
CLOCK_TITLE_CLOCK,
CLOCK_TITLE_LANGUAGE,
@@ -860,9 +871,7 @@ static void _bg_mouse_up_cb(void *data, Evas *evas, Evas_Object *obj, void *even
if (bg_touch_mode == TOUCH_MOVE)
return;
- int img_idx = (int)data;
- char img_path[512] = {0};
- snprintf(img_path, 511, SETTING_HOME_SCREEN_DIR_PATH"/BG_preview_%02d.png",img_idx);
+ char* img_path = (char*)data;
bg_prev_x = 0;
bg_touch_mode = NONE;
@@ -1018,7 +1027,7 @@ static Evas_Object *_create_background_index(Evas_Object *parent, void *data)
/* touch event */
evas_object_event_callback_add(page, EVAS_CALLBACK_MOUSE_DOWN, _bg_mouse_down_cb, NULL);
- evas_object_event_callback_add(page, EVAS_CALLBACK_MOUSE_UP, _bg_mouse_up_cb, (void *)i);
+ evas_object_event_callback_add(page, EVAS_CALLBACK_MOUSE_UP, _bg_mouse_up_cb, bg_path_str[i]);
evas_object_event_callback_add(page, EVAS_CALLBACK_MOUSE_MOVE, _bg_mouse_move_cb, NULL);
elm_object_part_content_set(clock_layout, "clock-image", page);