Fix coverity issues 89/287289/1 accepted/tizen_8.0_unified accepted/tizen_unified_riscv tizen_8.0 accepted/tizen/8.0/unified/20231005.093936 accepted/tizen/unified/20230127.161106 accepted/tizen/unified/riscv/20230724.093800 tizen_8.0_m2_release
authorWootak Jung <wootak.jung@samsung.com>
Thu, 26 Jan 2023 07:00:55 +0000 (16:00 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 26 Jan 2023 07:02:14 +0000 (16:02 +0900)
Change-Id: I9aa8ce614fe4986ccf0f85b21a5e4ccc5fd9a474
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/ps_context.c
src/ps_context_interface.c
src/ps_hook.c
src/ps_util.c

index b958a41..aff1510 100644 (file)
@@ -622,7 +622,7 @@ static int __ps_context_insert_network_id_to_database(gchar *mccmnc, gchar *cp_n
                if (value) {
                        g_hash_table_iter_init(&iter2, (GHashTable *)value);
                        while (g_hash_table_iter_next(&iter2, &key2, &value2) == TRUE) {
-                               dbg("[%s] key2(%s) value2(%s)", cp_name, key2, value2);
+                               dbg("[%s] key2(%s) value2(%s)", cp_name, (char *)key2, (char *)value2);
                                if (g_str_equal(key2, "0") == TRUE) {
                                        if (!value2 || g_strcmp0((const char *)value2, "") == 0)
                                                network_id = 0;
@@ -1036,7 +1036,7 @@ static int __ps_context_load_num_of_pdn_from_database(gchar *mccmnc, ps_service_
                info("[%s] Loaded value is wrong... restoring to 'default'", cp_name);
                num_of_pdn = max_pdn;
        } else if (num_of_pdn > max_pdn) {
-               info("[%s] Loaded value is gretaer than %d... restoring to 'default'", max_pdn, cp_name);
+               info("[%s] Loaded value is gretaer than %d... restoring to 'default'", cp_name, max_pdn);
                num_of_pdn = max_pdn;
        }
 
@@ -1661,7 +1661,7 @@ GSList *_ps_context_create_hashtable(ps_modem_t *modem, gboolean roaming)
        g_hash_table_insert(in_param, "2", g_strdup_printf("%d", roaming));
 
        for (retry = 0; retry < 5; retry++) {
-               ps_dbg_ex_modem(modem, "Reading database", modem->operator);
+               ps_dbg_ex_modem(modem, "Reading database");
                rv = tcore_storage_read_query_database_in_order(strg_db, handle, szQuery, in_param, &out_param, 27);
                if (rv != FALSE)
                        break;
index d321c1b..50b0af6 100644 (file)
@@ -149,7 +149,7 @@ static gboolean __ps_context_update_profile(ps_context_t *context, GHashTable *p
        while (g_hash_table_iter_next(&iter, &key, &value) == TRUE) {
                if (g_str_equal(key, "apn") == TRUE) {
                        tcore_context_set_apn(co_context, (const char *)value);
-                       info("APN (%s)", value);
+                       info("APN (%s)", (const char *)value);
                } else if (g_str_equal(key, "profile_name") == TRUE) {
                        tcore_context_set_profile_name(co_context, (const char *)value);
                } else if (g_str_equal(key, "auth_type") == TRUE) {
index 1ab935f..56bcee2 100644 (file)
@@ -193,7 +193,7 @@ static void __ps_hook_response_cb(UserRequest *ur, enum tcore_response_command c
                        co_network = tcore_plugin_ref_core_object(tcore_object_ref_plugin(co_modem),
                                                                  CORE_OBJECT_TYPE_NETWORK);
 
-                       ps_info_ex_modem(modem, "Sending Pending Request of type = id", id);
+                       ps_info_ex_modem(modem, "Sending Pending Request of type = %u", id);
                        tcore_user_request_set_response_hook(ur, __ps_hook_response_cb, modem);
                        if ((command == TRESP_NETWORK_SET_CANCEL_MANUAL_SEARCH)
                            || (command == TRESP_NETWORK_SEARCH)
index 97d8c20..a30b3d3 100644 (file)
@@ -199,7 +199,7 @@ gboolean ps_util_add_waiting_job(GQueue *queue, unsigned int id, UserRequest *ur
        wqd->ur = ur;
        g_queue_push_tail(queue, wqd);
 
-       dbg("id = %d, ur = 0x%x", wqd->id, wqd->ur);
+       dbg("id = %d, ur = %p", wqd->id, wqd->ur);
        return TRUE;
 }