From e2dee2c92b6d497217dec542d4d5441892bb29da Mon Sep 17 00:00:00 2001 From: Sungtaek Hong Date: Fri, 8 Dec 2017 14:48:49 +0900 Subject: [PATCH] efl_ui_clock: remove warning Summary: separator0 part was not text part, thus printing error. Test Plan: Run elementary_test->Efl.Ui.Clock Reviewers: jpeg, woohyun, cedric Differential Revision: https://phab.enlightenment.org/D5629 --- src/lib/elementary/efl_ui_clock.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/efl_ui_clock.c b/src/lib/elementary/efl_ui_clock.c index 6ba2b5b2b7..ac10a6155d 100644 --- a/src/lib/elementary/efl_ui_clock.c +++ b/src/lib/elementary/efl_ui_clock.c @@ -397,9 +397,11 @@ _reload_format(Evas_Object *obj) field->location); elm_layout_signal_emit(obj, buf, "elm"); } - snprintf - (buf, sizeof(buf), EDC_PART_SEPARATOR_STR, (field->location + 1)); - elm_layout_text_set(obj, buf, field->separator); + if (field->location + 1) + { + snprintf(buf, sizeof(buf), EDC_PART_SEPARATOR_STR, (field->location + 1)); + elm_layout_text_set(obj, buf, field->separator); + } } edje_object_message_signal_process(wd->resize_obj); @@ -525,9 +527,11 @@ _efl_ui_clock_elm_widget_theme_apply(Eo *obj, Efl_Ui_Clock_Data *sd) field->location); elm_layout_signal_emit(obj, buf, "elm"); - snprintf - (buf, sizeof(buf), EDC_PART_SEPARATOR_STR, field->location); - elm_layout_text_set(obj, buf, field->separator); + if (field->location) + { + snprintf(buf, sizeof(buf), EDC_PART_SEPARATOR_STR, (field->location)); + elm_layout_text_set(obj, buf, field->separator); + } dt_mod->field_value_display(sd->mod_data, field->item_obj); }