Fix build warnings
authorJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 4 Mar 2021 06:22:23 +0000 (15:22 +0900)
committer연정현/Tizen Platform Lab(SR)/Staff Engineer/삼성전자 <jungh.yeon@samsung.com>
Thu, 4 Mar 2021 07:13:10 +0000 (16:13 +0900)
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
parser/src/pkgmgr_parser_db.c
src/pkginfo_internal.c
src/pkgmgrinfo_certinfo.c
src/pkgmgrinfo_plugininfo.c
src/pkgmgrinfo_updateinfo.c

index 2a79eb4..f353099 100644 (file)
@@ -2192,8 +2192,6 @@ static int __delete_package_info(sqlite3 *db, const char *pkgid)
 
 API int pkgmgr_parser_insert_pkg_info(sqlite3 *db, manifest_x *mfx, uid_t uid)
 {
-       int ret;
-
        if (db == NULL || mfx == NULL) {
                _LOGE("invalid parameter");
                return PM_PARSER_R_EINVAL;
@@ -2210,8 +2208,6 @@ API int pkgmgr_parser_insert_pkg_info(sqlite3 *db, manifest_x *mfx, uid_t uid)
 
 API int pkgmgr_parser_update_pkg_info(sqlite3 *db, manifest_x *mfx, uid_t uid)
 {
-       int ret;
-
        if (db == NULL || mfx == NULL) {
                _LOGE("invalid parameter");
                return PM_PARSER_R_EINVAL;
@@ -2244,8 +2240,6 @@ API int pkgmgr_parser_insert_manifest_info_in_db(manifest_x *mfx)
 
 API int pkgmgr_parser_delete_pkg_info(sqlite3 *db, const char *package, uid_t uid)
 {
-       int ret;
-
        if (db == NULL || package == NULL) {
                _LOGE("invalid parameter");
                return PM_PARSER_R_EINVAL;
index a3ead1d..541276f 100644 (file)
@@ -770,12 +770,7 @@ static int __execute_query(sqlite3 *db, const char *query) {
 }
 
 API int execute_write_queries(sqlite3 *db, const char **queries, int len) {
-       int ret = 0;
-       int col_cnt = 0;
-       int row_cnt = 0;
-       int i = 0;
-       sqlite3_stmt *stmt = NULL;
-       char *result = NULL;
+       int i;
 
        __BEGIN_TRANSACTION(db);
        for (i = 0; i < len; ++i) {
index 225b8b9..55e26c4 100644 (file)
@@ -225,8 +225,6 @@ API int pkgmgrinfo_set_cert_value(pkgmgrinfo_instcertinfo_h handle,
 
 API int pkgmgrinfo_save_certinfo(const char *pkgid,
                                 pkgmgrinfo_instcertinfo_h handle, uid_t uid) {
-  pkgmgr_certinfo_x *info = (pkgmgr_certinfo_x *)handle;
-
   if (pkgid == NULL || handle == NULL) {
     _LOGE("invalid parameter");
     return PMINFO_R_EINVAL;
index 9d9fb5e..3367a87 100644 (file)
 #include <stdbool.h>
 #include <sqlite3.h>
 
+#include "manager/pkginfo_manager.h"
 #include "pkgmgrinfo_private.h"
 #include "pkgmgrinfo_debug.h"
 #include "pkgmgr-info.h"
 
-static void _free_plugin(gpointer data)
-{
-       plugin_x *plugin = (plugin_x *)data;
-       if (plugin == NULL)
-               return;
-       if (plugin->appid)
-               free((void *)plugin->appid);
-       free((void *)plugin);
-}
-
 API int pkgmgrinfo_plugininfo_foreach_plugininfo(const char *pkgid,
                const char *plugin_type, const char *plugin_name,
                pkgmgrinfo_plugin_list_cb plugin_list_cb, void *user_data)
index 3dd12b8..a5071c4 100644 (file)
@@ -48,22 +48,6 @@ static void __free_update_info(gpointer data)
 
 }
 
-static int __convert_update_type(const char *type, pkgmgrinfo_updateinfo_update_type *convert_type)
-{
-       if (strncasecmp(type, PMINFO_UPDATEINFO_TYPE_NONE,
-                       strlen(PMINFO_UPDATEINFO_TYPE_NONE)) == 0)
-               *convert_type = PMINFO_UPDATEINFO_NONE;
-       else if (strncasecmp(type, PMINFO_UPDATEINFO_TYPE_FORCE,
-                       strlen(PMINFO_UPDATEINFO_TYPE_FORCE)) == 0)
-               *convert_type = PMINFO_UPDATEINFO_FORCE;
-       else if (strncasecmp(type, PMINFO_UPDATEINFO_TYPE_OPTIONAL,
-                       strlen(PMINFO_UPDATEINFO_TYPE_OPTIONAL)) == 0)
-               *convert_type = PMINFO_UPDATEINFO_OPTIONAL;
-       else
-               return -1;
-       return 0;
-}
-
 API int pkgmgrinfo_updateinfo_create(
                pkgmgrinfo_updateinfo_h *updateinfo_handle)
 {