Fix build with ASan: incorrect variables declaration 74/128074/2
authorGonzha Dmitriy Evgenevich <d.gonzha@samsung.com>
Thu, 4 May 2017 16:29:16 +0000 (19:29 +0300)
committerjinwang.an <jinwang.an@samsung.com>
Fri, 7 Jul 2017 07:29:23 +0000 (16:29 +0900)
Global variables moved into .c files, variable declaration
changed to extern. Unused conflicting global variables removed

Change-Id: I5b879278ee0aa01ecd19ce6dd1d71ec9153ff3cb
Signed-off-by: jinwang.an <jinwang.an@samsung.com>
include/setting-battery.h
include/setting-clock.h
include/setting-language.h
include/setting-volume.h
src/setting-battery.c
src/setting-clock.c
src/setting-language.c
src/setting-volume-page.c

index 97aa9dee4cfd9f90dd2cd624b68db43b3b9b53ee..2aeae45f233c5ac370b9a9fcb6864384d92ef488 100644 (file)
@@ -46,9 +46,6 @@ struct _battery_info {
        int is_charging;
 };
 
-Ecore_Timer *battery_timer;
-
-
 
 /* ----------------method----------------------// */
 
index 7dfea91261f9eb4736c807df80ec5c25031be07b..cc8cc18f4f96d692a67cfa5d73859414c2ac2e98 100644 (file)
@@ -94,8 +94,7 @@ typedef struct _clock_type_data {
        char *value;
 } Clock_Type_Data;
 
-int is_alert_on_or_off;
-int is_running_clock;
+extern int is_running_clock;
 
 void  _clear_clock_cb(void *data , Evas *e, Evas_Object *obj, void *event_info);
 void _dt_cb(void *data, Evas_Object *obj, void *event_info);
index b4ef93f8ecf855e763bf955825c92b0540f5b577..0d7a17b4ad9e61f98b076ee4772b933123ba5f67 100644 (file)
@@ -46,8 +46,6 @@ struct _lang_menu_item {
        char *lang;
 };
 
-appdata *tmp_ad;
-
 
 char *_gl_lang_title_get(void *data, Evas_Object *obj, const char *part);
 Evas_Object *_gl_lang_ridio_get(void *data, Evas_Object *obj, const char *part);
index 68c3e9985eff43564bd6a9bc4a771c2e9cc6f2f8..971f87e4d444c0c8ce342173c24f3cb642dbee84 100644 (file)
@@ -35,14 +35,13 @@ struct _volume_menu_item {
        void (*func)(void *data, Evas_Object *obj, void *event_info);
 };
 
-player_h *player;
-
-int volume_index;
-int original_volume;
-int original_sound_mode;
-int curr_sound_type;
-int is_wav_playing_vol;
-int sound_id_vol;
+
+extern int volume_index;
+extern int original_volume;
+extern int original_sound_mode;
+extern int curr_sound_type;
+extern int is_wav_playing_vol;
+extern int sound_id_vol;
 
 
 /*--------------------------------------------------------------// */
index 09da01fa15af93a7f359e4b055d3f3b102ad84f4..5e9f582f4f3963fc1d0cf5b30989fe2104e5f5e7 100644 (file)
@@ -28,6 +28,9 @@ bool prev_charging_state;
 int image_index;
 int is_alive;
 
+Ecore_Timer *battery_timer;
+
+
 Evas_Object *_create_battery_content2(void *data);
 #if 0 /* _NOT_USED_ */
 static void _battery_percent_cb(void *data, Evas_Object *obj, void *event_info);
index 7a9794671ad727d1bcf5a00ad5b2c89011921ffa..f45b15b7a65dd2f3863c28cf98dfb626954fa097 100644 (file)
@@ -24,6 +24,8 @@
 #include "setting_view_toast.h"
 
 #include "setting_data_vconf.h"
+#include "circle/efl_extension_circle_object_scroller.h"
+#include "circle/efl_extension_rotary.h"
 
 EAPI Evas_Object        *elm_widget_top_get(const Evas_Object *obj);
 
@@ -72,6 +74,9 @@ static int clock_idx = 0;
 static int is_alert_mode_type = 0;
 static appdata *temp_ad = NULL;
 
+int is_alert_on_or_off;
+int is_running_clock;
+
 static int _clock_type_compare_cb(const void *d1, const void *d2);
 
 
@@ -612,7 +617,10 @@ static Evas_Object *_create_index(Evas_Object *parent, void *data)
        evas_object_show(scroller);
        g_clock_scroller = scroller;
 
-       Evas_Object *circle_scroller = eext_circle_object_scroller_add(scroller, temp_ad->circle_surface);
+       Evas_Object *circle_scroller = NULL;
+       circle_scroller = eext_circle_object_scroller_add(scroller, temp_ad->circle_surface);
+       if (circle_scroller == NULL)
+               return NULL;
        eext_circle_object_scroller_policy_set(circle_scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
        eext_rotary_object_event_activated_set(circle_scroller, EINA_TRUE);
 
index d9dcbd3fe805a5b7965211f9c4ebdbf7efa60e37..04e849c409b36639a98076a2fc47ae7d5409c564 100644 (file)
@@ -41,6 +41,8 @@ static void _tree_walk_langlist(xmlNodePtr cur);
 static struct _lang_menu_item lang_menu_its[LANGUAGE_ITEM_COUNT];
 static Evas_Object *g_lang_radio = NULL;
 
+appdata *tmp_ad;
+
 static char *
 _gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
 {
index a532244d790a3128b79f18202ec7860979680491..28363d535e66e464717e128fe15f8584c01353a8 100644 (file)
 #include "setting-common-sound.h"
 #include "setting_data_vconf.h"
 
+#include "circle/efl_extension_circle_object_scroller.h"
+#include "circle/efl_extension_circle_object.h"
+#include "circle/efl_extension_rotary.h"
+
 #define VOLUME_LIST_COUNT 4
 
 #ifndef VCONFKEY_SETAPPL_CALL_RINGTONE_SOUND_VOLUME_BACKUP_INT
 #define VCONFKEY_SETAPPL_TOUCH_FEEDBACK_SOUND_VOLUME_BACKUP_INT "db/setting/sound/touch_feedback/sound_volume_backup"
 #endif
 
+int volume_index;
+int original_volume;
+int original_sound_mode;
+int curr_sound_type;
+int is_wav_playing_vol;
+int sound_id_vol;
+
 static char *setting_volume_img_names[VOLUME_LIST_COUNT] = {
        "b_setting_multi_media.png",
        "b_setting_multi_media.png",