From: Kiseok Chang Date: Thu, 3 Jan 2019 06:54:08 +0000 (+0900) Subject: Fix dlog format errors X-Git-Tag: submit/tizen/20190103.065831^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f82ce7eaff7175aec3a70c70125c4e16096b10d9;p=profile%2Fmobile%2Fapps%2Fnative%2Fsettings.git Fix dlog format errors - tested on armv7l, aarc64, i586 and x86_64 Change-Id: Id3fb517add759860f702e8fa9439f39d67ad121c Signed-off-by: Kiseok Chang --- diff --git a/setting-common/include/setting-common-data-type.h b/setting-common/include/setting-common-data-type.h old mode 100644 new mode 100755 index b550a550..d5cac7b0 --- a/setting-common/include/setting-common-data-type.h +++ b/setting-common/include/setting-common-data-type.h @@ -122,7 +122,7 @@ typedef void (*setting_call_back_func)( #define MIN_MOVE_DISTANCE 30 #ifdef __LP64__ -typedef int64_t int_of_ptr_size; +typedef long long int int_of_ptr_size; #else typedef int int_of_ptr_size; #endif diff --git a/setting-smartmanager/smartmanager-data/include/smartmanager-data.h b/setting-smartmanager/smartmanager-data/include/smartmanager-data.h index b2e5a9e8..cc3c03a5 100755 --- a/setting-smartmanager/smartmanager-data/include/smartmanager-data.h +++ b/setting-smartmanager/smartmanager-data/include/smartmanager-data.h @@ -52,9 +52,9 @@ typedef enum { } Cycle_Mode_E; typedef struct { - int64_t total_data_used; - int64_t warning; - int64_t limit; + long long int total_data_used; + long long int warning; + long long int limit; Cycle_Mode_E cycle_mode; time_t interval_from; time_t interval_to; diff --git a/setting-smartmanager/smartmanager-data/include/smartmanager-utils.h b/setting-smartmanager/smartmanager-data/include/smartmanager-utils.h index bfd925f7..b4cd6713 100755 --- a/setting-smartmanager/smartmanager-data/include/smartmanager-utils.h +++ b/setting-smartmanager/smartmanager-data/include/smartmanager-utils.h @@ -37,13 +37,13 @@ typedef enum { int get_days_in_current_month(); -void get_data_amount_str(const char *prefix, int64_t num_bytes, char *txt_out, +void get_data_amount_str(const char *prefix, long long int num_bytes, char *txt_out, int len_max); -void get_data_int_amount_str(int64_t num_bytes, char *int_amount_str, +void get_data_int_amount_str(long long int num_bytes, char *int_amount_str, int len_max); -void get_data_unit_str(int64_t num_bytes, char *unit_str, int len_max); +void get_data_unit_str(long long int num_bytes, char *unit_str, int len_max); /** * @brief Formats string composed of number and ordinal number postfix @@ -127,10 +127,10 @@ bool get_subscriber_id_from_telephony_handle(telephony_h handle, bool compare_subscriber_ids(const char *id_a, const char *id_b); restrictions_result set_mobile_limit_restrictions(stc_h stc_handle, - const char *subscriber_id, int64_t limit, int64_t warning_limit); + const char *subscriber_id, long long int limit, long long int warning_limit); restrictions_result set_mobile_restriction_rule_parameters( - stc_restriction_rule_h rule, const char *subscriber_id, int64_t limit, - int64_t warning_limit); + stc_restriction_rule_h rule, const char *subscriber_id, long long int limit, + long long int warning_limit); bool unset_mobile_limit_restrictions(stc_h stc_handle, stc_restriction_rule_cb restrictions_cb, void *data); diff --git a/setting-smartmanager/smartmanager-data/src/smartmanager-data-main-view.c b/setting-smartmanager/smartmanager-data/src/smartmanager-data-main-view.c index 61a72976..34acd7d3 100755 --- a/setting-smartmanager/smartmanager-data/src/smartmanager-data-main-view.c +++ b/setting-smartmanager/smartmanager-data/src/smartmanager-data-main-view.c @@ -218,7 +218,7 @@ static void _graph_layout_fill(SmartMgrData *ad, Evas_Object *layout, long long hard_limit_data, time_t interval_from, time_t interval_to) { - int64_t gigs_multiplier = 0; + long long int gigs_multiplier = 0; char buff[64] = {'\0',}; _get_time_interval_str(interval_from, interval_to, buff, sizeof(buff)); elm_layout_text_set(layout, "timespan_txt", buff); diff --git a/setting-smartmanager/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c b/setting-smartmanager/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c index b9869019..1482c50b 100755 --- a/setting-smartmanager/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c +++ b/setting-smartmanager/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c @@ -7,7 +7,7 @@ #include #include -#define MAX_LIMIT_IN_BYTES (((int64_t)LONG_MAX+1)*50) +#define MAX_LIMIT_IN_BYTES (((long long int)LONG_MAX+1)*50) static int _create(void *data); static int _destroy(void *data); @@ -217,7 +217,7 @@ static Evas_Object *_create_popup_button(Evas_Object *parent, char *part, } static void _entry_set_displayed_value(Evas_Object *entry, Evas_Object *button, - int64_t value) + long long int value) { char int_amount_buf[256] = {0}; char unit_buf[256] = {0}; @@ -253,8 +253,8 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb( int ret = STC_ERROR_NONE; char *app_id = NULL; char *subscriber_id = NULL; - int64_t limit = 0; - int64_t warning_limit = 0; + long long int limit = 0; + long long int warning_limit = 0; stc_iface_type_e iface_type = STC_IFACE_UNKNOWN; stc_restriction_type_e type = STC_RSTN_TYPE_UNKNOWN; stc_restriction_rule_h mobile_rule = NULL; @@ -611,10 +611,10 @@ static void _warning_popup_done_cb(void *data, Evas_Object *obj, if (set_mobile_limit_restrictions(smd->stc, smd->selected_sim_subscriber_id, smd->selected_sim_limits->limit, - (int64_t)value) == RESTRICTIONS_ERROR) + (long long int)value) == RESTRICTIONS_ERROR) SETTING_TRACE_DEBUG("Warning limit not writen to stc."); - smd->selected_sim_limits->warning = (int64_t)value; + smd->selected_sim_limits->warning = (long long int)value; evas_object_del(popup_info.popup); } else { create_toast_popup(popup_info.popup, @@ -693,11 +693,11 @@ static void _limit_popup_done_cb(void *data, Evas_Object *obj, if (value > smd->selected_sim_limits->warning) { if (set_mobile_limit_restrictions(smd->stc, smd->selected_sim_subscriber_id, - (int64_t)value, + (long long int)value, smd->selected_sim_limits->warning) == RESTRICTIONS_ERROR) SETTING_TRACE_DEBUG("Limit not writen to stc."); - smd->selected_sim_limits->limit = (int64_t)value; + smd->selected_sim_limits->limit = (long long int)value; evas_object_del(popup_info.popup); } else { create_toast_popup(popup_info.popup, diff --git a/setting-smartmanager/smartmanager-data/src/smartmanager-data.c b/setting-smartmanager/smartmanager-data/src/smartmanager-data.c index 80af010f..d23de6cd 100755 --- a/setting-smartmanager/smartmanager-data/src/smartmanager-data.c +++ b/setting-smartmanager/smartmanager-data/src/smartmanager-data.c @@ -496,8 +496,8 @@ static stc_callback_ret_e _stc_stats_info_cb(stc_error_e result, char *app_id = NULL; char *subscriber_id = NULL; const char *subscriber_id_to_look_for = user_data; - int64_t incoming = 0; - int64_t outgoing = 0; + long long int incoming = 0; + long long int outgoing = 0; stc_iface_type_e iface = STC_IFACE_UNKNOWN; SETTING_TRACE_DEBUG("per app cb, looking for subscriber id: %s", @@ -576,8 +576,8 @@ static stc_callback_ret_e _stc_stats_info_cb(stc_error_e result, static stc_callback_ret_e _total_stats_cb(stc_error_e result, stc_stats_info_h info, void *user_data) { - int64_t incoming = 0; - int64_t outgoing = 0; + long long int incoming = 0; + long long int outgoing = 0; char *subscriber_id = NULL; const char *subscriber_id_to_look_for = user_data; int ret = STC_ERROR_NONE; diff --git a/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c b/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c index 68bf376c..eb941baa 100755 --- a/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c +++ b/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c @@ -36,7 +36,7 @@ int get_days_in_current_month() return now_tm.tm_mday; } -void get_data_amount_str(const char *prefix, int64_t num_bytes, char *txt_out, +void get_data_amount_str(const char *prefix, long long int num_bytes, char *txt_out, int len_max) { float amount = 0.0; @@ -62,7 +62,7 @@ void get_data_amount_str(const char *prefix, int64_t num_bytes, char *txt_out, } } -void get_data_int_amount_str(int64_t num_bytes, char *int_amount_str, +void get_data_int_amount_str(long long int num_bytes, char *int_amount_str, int len_max) { int amount = 0; @@ -93,7 +93,7 @@ void get_data_int_amount_str(int64_t num_bytes, char *int_amount_str, } } -void get_data_unit_str(int64_t num_bytes, char *unit_str, int len_max) +void get_data_unit_str(long long int num_bytes, char *unit_str, int len_max) { int amount = 0; @@ -349,8 +349,8 @@ bool compare_subscriber_ids(const char *id_a, const char *id_b) restrictions_result set_mobile_restriction_rule_parameters( stc_restriction_rule_h rule, const char *subscriber_id, - int64_t limit, - int64_t warning_limit) + long long int limit, + long long int warning_limit) { SETTING_TRACE_BEGIN; int ret = STC_ERROR_NONE; @@ -402,7 +402,7 @@ restrictions_result set_mobile_restriction_rule_parameters( } restrictions_result set_mobile_limit_restrictions(stc_h stc_handle, - const char *subscriber_id, int64_t limit, int64_t warning_limit) + const char *subscriber_id, long long int limit, long long int warning_limit) { SETTING_TRACE_BEGIN; int ret = STC_ERROR_NONE; diff --git a/setting-storage/src/setting-storage-utils.c b/setting-storage/src/setting-storage-utils.c index 4b698b15..da135dbc 100755 --- a/setting-storage/src/setting-storage-utils.c +++ b/setting-storage/src/setting-storage-utils.c @@ -51,8 +51,8 @@ void storage_get_internal_storage_status(double *total, double *avail) ret = storage_get_internal_memory_size(&s); if (0 == ret) { SETTING_TRACE("Total = %llu, Available = %llu", - (s.f_frsize * s.f_blocks), - (s.f_bsize * s.f_bavail)); + (long long unsigned int)(s.f_frsize * s.f_blocks), + (long long unsigned int)(s.f_bsize * s.f_bavail)); tmp_total = (double)s.f_frsize * s.f_blocks; #if 0 *avail = (double)s.f_bfree * s.f_frsize;