Fix coverity issues 82/287282/1 accepted/tizen_8.0_unified accepted/tizen_unified_riscv tizen_8.0 accepted/tizen/8.0/unified/20231005.093918 accepted/tizen/unified/20230127.161114 accepted/tizen/unified/riscv/20230724.093745 tizen_8.0_m2_release
authorWootak Jung <wootak.jung@samsung.com>
Thu, 26 Jan 2023 06:56:59 +0000 (15:56 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 26 Jan 2023 06:56:59 +0000 (15:56 +0900)
Change-Id: I8c87e3a7ff9fafc72561173e17fb08885323638d
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/at.c
src/core_object/core_object.c
src/server.c
src/util.c

index 881498e..65dc1ed 100644 (file)
--- a/src/at.c
+++ b/src/at.c
@@ -255,7 +255,7 @@ static void _emit_unsolicited_message(TcoreAT *at, const char *line)
                        dbg("Binary mode");
 
                        at->pdu_lines = g_slist_append(at->pdu_lines, (gpointer)line);
-                       dbg("at->pdu_lines: 0x%x", at->pdu_lines);
+                       dbg("at->pdu_lines: %p", at->pdu_lines);
                } else
                        at->pdu_lines = g_slist_append(at->pdu_lines, g_strdup(line));
 
@@ -1068,7 +1068,7 @@ TReturn tcore_prepare_and_send_at_request(CoreObject *co,
                err("HAL is NULL");
                return ret;
        }
-       dbg("hal: [0x%x]", hal);
+       dbg("hal: [%p]", hal);
 
        /* Create Pending Request */
        pending = tcore_pending_new(co, 0);
index 6cb9d3f..6e05ff3 100644 (file)
@@ -79,7 +79,7 @@ static void _util_print_mapping_tbl_entry(object_mapping_table_t *tbl_entry)
 {
        GSList *co_list;
 
-       msg("------> Table Entry - HAL: [0x%x]", tbl_entry->hal);
+       msg("------> Table Entry - HAL: [%p]", tbl_entry->hal);
 
        co_list = tbl_entry->object_type;
        if (co_list == NULL) {
@@ -92,7 +92,7 @@ static void _util_print_mapping_tbl_entry(object_mapping_table_t *tbl_entry)
                if (co_list->data == NULL)
                        continue;
 
-               msg("           Core Object type: [0x%x]", co_list->data);
+               msg("           Core Object type: [%p]", co_list->data);
        }
 }
 
@@ -105,7 +105,7 @@ static void _free_tbl_entry(gpointer data)
 
        tbl_entry = data;
 
-       dbg("Removing Mapping Table Entry - HAL: [0x%x]", tbl_entry->hal);
+       dbg("Removing Mapping Table Entry - HAL: [%p]", tbl_entry->hal);
        _util_print_mapping_tbl_entry(tbl_entry);
 
        /* Free Core Object types list */
@@ -991,7 +991,7 @@ void *tcore_object_add_mapping_tbl_entry(void *mapping_tbl,
        object_mapping_table_t *tbl_entry;
 
        if (hal == NULL) {
-               err("Mapping Table: [0x%x] HAL: [0x%x]", mapping_tbl, hal);
+               err("Mapping Table: [%p] HAL: [%p]", mapping_tbl, hal);
                return mapping_tbl;
        }
 
@@ -1029,7 +1029,7 @@ void *tcore_object_add_mapping_tbl_entry(void *mapping_tbl,
         * Appending the Core Object type to the list of Core Objects types
         */
        tbl_entry->object_type = g_slist_append(tbl_entry->object_type, GUINT_TO_POINTER(object_type));
-       dbg("Added Mapping Table entry - HAL: [0x%x] Object type: [0x%x]", hal, object_type);
+       dbg("Added Mapping Table entry - HAL: [%p] Object type: [0x%x]", hal, object_type);
 
        return mapping_tbl_list;
 }
@@ -1063,7 +1063,7 @@ void *tcore_object_remove_mapping_tbl_entry(void *mapping_tbl, TcoreHal *hal)
                return mapping_tbl_list;
        }
 
-       dbg("Removing Mapping Table Entry - HAL: [0x%x]", hal);
+       dbg("Removing Mapping Table Entry - HAL: [%p]", hal);
        _util_print_mapping_tbl_entry(tbl_entry);
 
        /* Free Core Object types list */
index 3bd5dcd..3a1adec 100644 (file)
@@ -332,7 +332,7 @@ TcorePlugin *tcore_server_search_plugin_list(Server *s, const char *desc_name)
                }
                desc = NULL;
        }
-       err("plugin with desc_name %s not found");
+       err("plugin with desc_name %s not found", desc_name);
        return NULL;
 }
 
@@ -932,7 +932,7 @@ void tcore_server_print_modems(Server *s)
                        continue;
                }
 
-               msg("Modem: [0x%x] CP Name: [%s]", modem, modem->cp_name);
+               msg("Modem: [%p] CP Name: [%s]", modem, modem->cp_name);
                msg("Modem Plug-in: [%s] <---> Modem Interface Plug-in: [%s]",
                        tcore_plugin_ref_plugin_name(modem->modem_plugin),
                        tcore_plugin_ref_plugin_name(modem->modem_iface_plugin));
index 9da3a5c..7f3498e 100644 (file)
@@ -227,7 +227,7 @@ static int _convert_gsm_to_ucs2(unsigned short *dest, unsigned char *src, unsign
                src++; dest++;
        }
 
-       dbg("cvt sr(%s), the size of data (%d) ", org, dest - org);
+       dbg("cvt sr, the size of data (%d) ", dest - org);
        return (dest - org);
 }