Fix warning : invalid argument in format 59/162659/1 accepted/tizen/unified/20171207.124725 submit/tizen/20171207.053411
authorJeesun Kim <iamjs.kim@samsung.com>
Tue, 5 Dec 2017 00:51:50 +0000 (09:51 +0900)
committerJeesun Kim <iamjs.kim@samsung.com>
Tue, 5 Dec 2017 00:52:01 +0000 (09:52 +0900)
Change-Id: I95bd1c380a639e66f1541f45140c5b4793d3f099

17 files changed:
client/cal_client_handle.c
client/cal_client_reminder.c
common/cal_filter.c
common/cal_internal.h
server/cal_server_alarm.c
server/db/cal_db_plugin_alarm.c
server/db/cal_db_plugin_attendee.c
server/db/cal_db_plugin_book.c
server/db/cal_db_plugin_event.c
server/db/cal_db_plugin_extended.c
server/db/cal_db_plugin_instance_localtime.c
server/db/cal_db_plugin_instance_localtime_extended.c
server/db/cal_db_plugin_instance_utime.c
server/db/cal_db_plugin_instance_utime_extended.c
server/db/cal_db_plugin_search.c
server/db/cal_db_plugin_timezone.c
server/db/cal_db_plugin_todo.c

index 5a4bda8ee933241f295b4a24d8b0d3e16f453e37..23a9685362dbb9a0b1d47362f95677a962206051 100644 (file)
@@ -34,7 +34,7 @@ static GHashTable *_cal_handle_table = NULL;
 /* LCOV_EXCL_START */
 static void _foreach_cb(gpointer key, gpointer value, gpointer user_data)
 {
-       DBG("[hash check]--------- key[%s] value[%p]", key, value);
+       DBG("[hash check]--------- key[%s] value[%p]", (char *)key, (char *)value);
 }
 static void _print_hash(GHashTable *table)
 {
index 4d533cbf9e6262f3dc5b86ea5a2cefa911aa58ec..0edf16a6574dd5d4bdfc8d52eb2a7f49aae30c0f 100644 (file)
@@ -58,7 +58,7 @@ EXPORT_API int calendar_reminder_add_cb(calendar_reminder_cb callback, void *use
                }
 
                if (callback == cb_info->cb && user_data == cb_info->user_data) {
-                       DBG("This callback is already appended(%x)(%x)", callback, user_data);
+                       DBG("This callback is already appended(%p)(%p)", callback, user_data);
                        pthread_mutex_unlock(&cal_mutex_reminder);
                        return CALENDAR_ERROR_NONE;
                }
@@ -75,7 +75,7 @@ EXPORT_API int calendar_reminder_add_cb(calendar_reminder_cb callback, void *use
                /* LCOV_EXCL_STOP */
        }
 
-       DBG("add reminer(0x%x)", callback);
+       DBG("add reminer(%p)", callback);
        ci->id = cal_dbus_subscribe_signal(CAL_NOTI_REMINDER_CAHNGED,
                        cal_dbus_call_reminder_cb, user_data, NULL);
        ci->cb = callback;
@@ -114,13 +114,13 @@ EXPORT_API int calendar_reminder_remove_cb(calendar_reminder_cb callback, void *
 
        if (0 == is_matched) {
                /* LCOV_EXCL_START */
-               ERR("Not matched callback(0x%x)", callback);
+               ERR("Not matched callback(%p)", callback);
                pthread_mutex_unlock(&cal_mutex_reminder);
                return CALENDAR_ERROR_INVALID_PARAMETER;
                /* LCOV_EXCL_STOP */
        }
 
-       DBG("remove reminder(0x%x)", callback);
+       DBG("remove reminder(%p)", callback);
        callback_info_s *ci = (callback_info_s *)cursor->data;
        cal_dbus_unsubscribe_signal(ci->id);
        free(ci);
@@ -152,7 +152,7 @@ int cal_client_reminder_call_subscribe(const char *stream)
                        cursor = g_slist_next(cursor);
                        continue;
                }
-               DBG("called reminder(0x%x)", ci->cb);
+               DBG("called reminder(%p)", ci->cb);
                ci->cb(stream, ci->user_data);
                cursor = g_slist_next(cursor);
        }
index 2ec324dce32bf9ecb4828f3a87e210f5ba9a84c2..62fcbd70b10accbe2354f5b5f744bd57869746d1 100644 (file)
@@ -199,7 +199,7 @@ EXPORT_API int calendar_filter_add_double(calendar_filter_h filter, unsigned int
 
        com_filter = (cal_composite_filter_s*)filter;
        ret = _cal_filter_create_attribute(com_filter, property_id, match, CAL_FILTER_DOUBLE, &int_filter);
-       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
+       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d), match_value(%lf)", property_id, match, match_value);
 
        int_filter->value.d = match_value;
 
@@ -227,7 +227,7 @@ EXPORT_API int calendar_filter_add_lli(calendar_filter_h filter, unsigned int pr
 
        com_filter = (cal_composite_filter_s*)filter;
        ret = _cal_filter_create_attribute(com_filter, property_id, match, CAL_FILTER_LLI, &int_filter);
-       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
+       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d), match_value(%lld)", property_id, match, match_value);
 
        int_filter->value.lli = match_value;
 
@@ -254,7 +254,7 @@ EXPORT_API int calendar_filter_add_caltime(calendar_filter_h filter, unsigned in
 
        com_filter = (cal_composite_filter_s*)filter;
        ret = _cal_filter_create_attribute(com_filter, property_id, match, CAL_FILTER_CALTIME, &int_filter);
-       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d), match_value(%d)", property_id, match, match_value);
+       RETVM_IF(CALENDAR_ERROR_NONE != ret, ret, "property_id(%d), match(%d)", property_id, match);
 
        int_filter->value.caltime = match_value;
 
index 085358b7c6c1589f12da55d7571250fca28d86b0..5ccebec5905bd29d3b0bed8e3611f9f58697af9d 100644 (file)
 #define CAL_PRINT_TIMESTAMP gettimeofday(&timeval_e, NULL); \
        timersub(&timeval_e, &timeval_s, &timeval_d); \
        timeval_s = timeval_e; \
-       DBG(COLOR_PURPLE "<<<<< (%03d.%03dsec)" COLOR_END, timeval_d.tv_sec % 1000, timeval_d.tv_usec/1000);
+       DBG(COLOR_PURPLE "<<<<< (%03d.%03dsec)" COLOR_END, (int)(timeval_d.tv_sec % 1000), (int)(timeval_d.tv_usec/1000));
 
 #define CAL_PROFILE
 #ifdef CAL_PROFILE
index c5c4b08d6eff6e7b3e48e955057c4e34bd9257cc..ab86b205acec26713a4500e02b964c9d6527bb1e 100644 (file)
@@ -363,7 +363,7 @@ static int cal_server_alarm_get_alert_time(int alarm_id, time_t *tt_alert)
                                st.tm_min = n;
                                st.tm_sec = s;
                                *tt_alert = mktime(&st);
-                               DBG("datetime[%s] to %02d:%02d:%02d (%d)", datetime, h, n, s, *tt_alert);
+                               DBG("datetime[%s] to %02d:%02d:%02d (%ld)", datetime, h, n, s, *tt_alert);
                        }
                }
                sqlite3_finalize(stmt);
@@ -400,7 +400,7 @@ static int cal_server_alarm_get_alert_time(int alarm_id, time_t *tt_alert)
                }
                break;
        }
-       DBG("alert_time(%d) = utime(%lld) - (tick(%d) * unit(%d))", *tt_alert, utime, tick, unit);
+       DBG("alert_time(%ld) = utime(%lld) - (tick(%d) * unit(%d))", *tt_alert, utime, tick, unit);
 
        *tt_alert = utime - (tick * unit);
        return CALENDAR_ERROR_NONE;
@@ -1104,7 +1104,7 @@ static void cal_server_alarm_alert(time_t tt_alert)
 static int _alert_cb(alarm_id_t alarm_id, void *data)
 {
        CAL_FN_CALL();
-       DBG("alarm_id (%ld)", alarm_id);
+       DBG("alarm_id (%d)", (int)alarm_id);
 
        time_t tt_alert = 0;
        cal_server_alarm_get_alert_time(alarm_id, &tt_alert);
index b2c2020d140783b9ccc70618300bc734242c3922..c7f6c53d6c1a4ee048dacf5338cca099403334ce 100644 (file)
@@ -293,7 +293,7 @@ static int _cal_db_alarm_get_records_with_query(calendar_query_h query, int offs
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
@@ -482,7 +482,7 @@ static int _cal_db_alarm_get_count_with_query(calendar_query_h query, int *out_c
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
index 9ddbdfe3aee110850c538577a692a452b6a9efad..4d6bd50988f856b0b9878e321a3d72523f712585 100644 (file)
@@ -268,7 +268,7 @@ static int _cal_db_attendee_get_records_with_query(calendar_query_h query, int o
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
@@ -451,7 +451,7 @@ static int _cal_db_attendee_get_count_with_query(calendar_query_h query, int *ou
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
index b22eb226d3c604672b93d7dc7eab923350ffc8dd..767398da98463bd32660feafc3065966916c5910 100644 (file)
@@ -514,7 +514,7 @@ static int _cal_db_book_get_records_with_query(calendar_query_h query, int offse
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        return ret;
                        /* LCOV_EXCL_STOP */
                }
@@ -728,7 +728,7 @@ static int _cal_db_book_get_count_with_query(calendar_query_h query, int *out_co
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
index 92aeca9e971cd00f1058fd1d33ecbac564b1b7c1..ab3e9878ec92b316153e997fac82b6013f74f128 100644 (file)
@@ -1165,7 +1165,7 @@ static int _cal_db_event_get_records_with_query(calendar_query_h query, int offs
                if (CALENDAR_ERROR_NONE != ret) {
                        CAL_FREE(table_name);
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        return ret;
                        /* LCOV_EXCL_STOP */
                }
@@ -1400,7 +1400,7 @@ static int _cal_db_event_get_count_with_query(calendar_query_h query, int *out_c
                if (CALENDAR_ERROR_NONE != ret) {
                        CAL_FREE(table_name);
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        return ret;
                        /* LCOV_EXCL_STOP */
                }
index 14d90172d0e6ca1df91fef93f6ddefdcaf619c79..33d14f70d802d1026f50af60bd211ca820bcbd77 100644 (file)
@@ -323,7 +323,7 @@ static int _cal_db_extended_get_records_with_query(calendar_query_h query, int o
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        return ret;
                        /* LCOV_EXCL_STOP */
                }
@@ -524,7 +524,7 @@ static int _cal_db_extended_get_count_with_query(calendar_query_h query, int *ou
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
index c10b3e9cf0ae92bd60c316c905028385bc1b1341..ca7c263537bb5852ca09ddf1b4d33ce64897863b 100644 (file)
@@ -182,7 +182,7 @@ static int _cal_db_instance_localtime_get_records_with_query(calendar_query_h qu
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
@@ -377,7 +377,7 @@ static int _cal_db_instance_localtime_get_count_with_query(calendar_query_h quer
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
index f079c9304d52c76caf1354efa07e85de789f5642..004e37ead57105adecfd38e62298719fc3182e80 100644 (file)
@@ -149,7 +149,7 @@ static int _cal_db_instance_localtime_extended_get_records_with_query(calendar_q
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
@@ -333,7 +333,7 @@ static int _cal_db_instance_localtime_extended_get_count_with_query(calendar_que
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
index c72a2c9d1633ad843c48543187e50a51a12ef94f..0ef8e77daa346dfbb6fb035749389d9e13a4d862 100644 (file)
@@ -186,7 +186,7 @@ static int _cal_db_instance_utime_get_records_with_query(calendar_query_h query,
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
@@ -380,7 +380,7 @@ static int _cal_db_instance_utime_get_count_with_query(calendar_query_h query, i
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
index 0a58ca251752ba2cb5785b6ef332fc5b70ddd448..fa49f72d9fce384ddcc30cd8742a32e4e70f2ddb 100644 (file)
@@ -148,7 +148,7 @@ static int _cal_db_instance_utime_extended_get_records_with_query(calendar_query
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
@@ -333,7 +333,7 @@ static int _cal_db_instance_utime_extended_get_count_with_query(calendar_query_h
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
index a6fa19a526eb729d307f90ff0b9ce04980e42163..8a9f23627d14ba74d26849d75fc672b7761e6bec 100644 (file)
@@ -79,7 +79,7 @@ static int _cal_db_search_get_records_with_query(calendar_query_h query, int off
                                &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        return ret;
                        /* LCOV_EXCL_STOP */
                }
@@ -285,7 +285,7 @@ static int _cal_db_search_get_count_with_query(calendar_query_h query, int *out_
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        CAL_FREE(projection);
                        return ret;
index 126654785ca1ee363e309df4f759a571cb8e14af..518d7bcd3beb3d0424cc1de7420099ea2a8d80e3 100644 (file)
@@ -471,7 +471,7 @@ static int _cal_db_timezone_get_records_with_query(calendar_query_h query, int o
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        return ret;
                        /* LCOV_EXCL_STOP */
                }
@@ -715,7 +715,7 @@ static int _cal_db_timezone_get_count_with_query(calendar_query_h query, int *ou
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
index d1ade7adbf903f99556e6a97523888ff1539f143..94b76cb16749b542ded6ad6ef3ad057143361a83 100644 (file)
@@ -1014,7 +1014,7 @@ static int _cal_db_todo_get_records_with_query(calendar_query_h query, int offse
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */
@@ -1245,7 +1245,7 @@ static int _cal_db_todo_get_count_with_query(calendar_query_h query, int *out_co
                ret = cal_db_query_create_condition(query, &condition, &bind_text);
                if (CALENDAR_ERROR_NONE != ret) {
                        /* LCOV_EXCL_START */
-                       ERR("cal_db_query_create_condition() Fail(%d), ret");
+                       ERR("cal_db_query_create_condition() Fail(%d)", ret);
                        CAL_FREE(table_name);
                        return ret;
                        /* LCOV_EXCL_STOP */