From: Kiseok Chang Date: Thu, 3 Jan 2019 06:54:08 +0000 (+0900) Subject: Fix dlog format errors X-Git-Tag: submit/tizen/20190409.085310~1^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8c68728697b306fe84d6a6dc0d3be0f631e7f5a;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/inc/setting-common-data-type.h b/setting-common/inc/setting-common-data-type.h old mode 100644 new mode 100755 index ad8b0544..f511dc70 --- a/setting-common/inc/setting-common-data-type.h +++ b/setting-common/inc/setting-common-data-type.h @@ -121,7 +121,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-storage/src/setting-storage-utils.c b/setting-storage/src/setting-storage-utils.c index 52bd6e38..175b9efe 100644 --- 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; diff --git a/smartmanager-data/inc/smartmanager-data.h b/smartmanager-data/inc/smartmanager-data.h index 0fa598ff..35783d85 100644 --- a/smartmanager-data/inc/smartmanager-data.h +++ b/smartmanager-data/inc/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/smartmanager-data/inc/smartmanager-utils.h b/smartmanager-data/inc/smartmanager-utils.h index c2b2c57e..a1136c59 100644 --- a/smartmanager-data/inc/smartmanager-utils.h +++ b/smartmanager-data/inc/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/smartmanager-data/src/smartmanager-data-main-view.c b/smartmanager-data/src/smartmanager-data-main-view.c index 8920deaf..662797ad 100644 --- a/smartmanager-data/src/smartmanager-data-main-view.c +++ b/smartmanager-data/src/smartmanager-data-main-view.c @@ -224,7 +224,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/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c b/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c index 9f029a6f..4b3a3215 100644 --- a/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c +++ b/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c @@ -8,7 +8,7 @@ #include "smartmanager-data-usage-mobile-settings.h" #include "smartmanager-utils.h" -#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); @@ -218,7 +218,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}; @@ -254,8 +254,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_rule_h rule = NULL; restrictions_result restrictions_res = RESTRICTIONS_ERROR; @@ -326,7 +326,7 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb( SETTING_TRACE_ERROR( "set_mobile_restriction_rule_parameters() error"); - stc_restriction_rule_destroy(mobile_rule); + stc_restriction_rule_destroy(rule); free(subscriber_id); return STC_CALLBACK_CONTINUE; } @@ -335,12 +335,12 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb( if (STC_ERROR_NONE != ret) { SETTING_TRACE_ERROR("stc_unset_restriction() error: %s", get_error_message(ret)); - stc_restriction_rule_destroy(mobile_rule); + stc_restriction_rule_destroy(rule); free(subscriber_id); return STC_CALLBACK_CONTINUE; } - stc_restriction_rule_destroy(mobile_rule); + stc_restriction_rule_destroy(rule); } free(subscriber_id); @@ -604,10 +604,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, @@ -686,11 +686,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/smartmanager-data/src/smartmanager-data.c b/smartmanager-data/src/smartmanager-data.c index dd14adb8..d6dc751d 100644 --- a/smartmanager-data/src/smartmanager-data.c +++ b/smartmanager-data/src/smartmanager-data.c @@ -497,8 +497,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", @@ -577,8 +577,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/smartmanager-data/src/smartmanager-utils.c b/smartmanager-data/src/smartmanager-utils.c index a9dc4091..133d1bc8 100644 --- a/smartmanager-data/src/smartmanager-utils.c +++ b/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;