Remove compile warning messages 70/61570/5 accepted/tizen/common/20160311.013732 accepted/tizen/ivi/20160311.013640 accepted/tizen/mobile/20160311.013256 accepted/tizen/tv/20160311.013429 accepted/tizen/wearable/20160311.013530 submit/tizen/20160310.115150
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 9 Mar 2016 22:44:22 +0000 (07:44 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 10 Mar 2016 02:22:49 +0000 (11:22 +0900)
Change-Id: Ia12c7317158f5df7b8339842568b3f016a988b56
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
include/pkgmgrinfo_basic.h
include/pkgmgrinfo_private.h
parser/pkgmgr_parser.c
parser/pkgmgr_parser_db.c
src/pkgmgrinfo_appinfo.c
src/pkgmgrinfo_certinfo.c
src/pkgmgrinfo_db.c
src/pkgmgrinfo_pkginfo.c

index 915a8a5..0cd0059 100644 (file)
@@ -4,32 +4,32 @@
 #include <glib.h>
 
 typedef struct metadata_x {
-       const char *key;
-       const char *value;
+       char *key;
+       char *value;
 } metadata_x;
 
 typedef struct permission_x {
-       const char *type;
-       const char *value;
+       char *type;
+       char *value;
 } permission_x;
 
 typedef struct icon_x {
-       const char *text;
-       const char *lang;
-       const char *section;
-       const char *size;
-       const char *resolution;
-       const char *dpi;
+       char *text;
+       char *lang;
+       char *section;
+       char *size;
+       char *resolution;
+       char *dpi;
 } icon_x;
 
 typedef struct image_x {
-       const char *text;
-       const char *lang;
-       const char *section;
+       char *text;
+       char *lang;
+       char *section;
 } image_x;
 
 typedef struct define_x {
-       const char *path;
+       char *path;
        GList *allowed;
        GList *request;
 } define_x;
@@ -40,107 +40,107 @@ typedef struct datashare_x {
 } datashare_x;
 
 typedef struct description_x {
-       const char *name;
-       const char *text;
-       const char *lang;
+       char *name;
+       char *text;
+       char *lang;
 } description_x;
 
 typedef struct label_x {
-       const char *name;
-       const char *text;
-       const char *lang;
+       char *name;
+       char *text;
+       char *lang;
 } label_x;
 
 typedef struct author_x {
-       const char *email;
-       const char *href;
-       const char *text;
-       const char *lang;
+       char *email;
+       char *href;
+       char *text;
+       char *lang;
 } author_x;
 
 typedef struct license_x {
-       const char *text;
-       const char *lang;
+       char *text;
+       char *lang;
 } license_x;
 
 typedef struct condition_x {
-       const char *name;
-       const char *text;
+       char *name;
+       char *text;
 } condition_x;
 
 typedef struct notification_x {
-       const char *name;
-       const char *text;
+       char *name;
+       char *text;
 } notification_x;
 
 typedef struct appcontrol_x {
-       const char *operation;
-       const char *uri;
-       const char *mime;
+       char *operation;
+       char *uri;
+       char *mime;
 } appcontrol_x;
 
 typedef struct compatibility_x {
-       const char *name;
-       const char *text;
+       char *name;
+       char *text;
 } compatibility_x;
 
 typedef struct datacontrol_x {
-       const char *providerid;
-       const char *access;
-       const char *type;
+       char *providerid;
+       char *access;
+       char *type;
 } datacontrol_x;
 
 typedef struct splashscreen_x {
-       const char *src;
-       const char *type;
-       const char *dpi;
-       const char *orientation;
-       const char *indicatordisplay;
-       const char *operation;
+       char *src;
+       char *type;
+       char *dpi;
+       char *orientation;
+       char *indicatordisplay;
+       char *operation;
 } splashscreen_x;
 
 typedef struct application_x {
-       const char *appid;      /*attr*/
-       const char *exec;       /*attr*/
-       const char *nodisplay;  /*attr, default: "false"*/
-       const char *multiple;   /*attr, default: "false"*/
-       const char *taskmanage; /*attr, default: "true"*/
-       const char *enabled;    /*attr, default: "true"*/
-       const char *type;       /*attr*/
-       const char *categories; /*attr*/
-       const char *extraid;    /*attr*/
-       const char *hwacceleration;     /*attr, default: "default"*/
-       const char *screenreader;       /*attr, default: "use-system-setting"*/
-       const char *mainapp;    /*attr, default: "false"*/
-       const char *package;    /*set from package_x*/
-       const char *recentimage;        /*attr, default: "false"*/
-       const char *launchcondition;    /*attr, default: "false"*/
-       const char *indicatordisplay;   /*attr, default: "true"*/
-       const char *portraitimg;        /*attr*/
-       const char *landscapeimg;       /*attr*/
-       const char *effectimage_type;   /*attr, default: "image"*/
-       const char *guestmode_visibility;       /*attr, default: "true"*/
-       const char *component;  /*no xml part*/
-       const char *permission_type;    /*attr, default: "normal"*/
-       const char *component_type;     /*attr, default: "uiapp"*/
-       const char *preload;    /*no xml part*/
-       const char *submode;    /*attr, default: "false"*/
-       const char *submode_mainid;     /*attr, default: "false"*/
-       const char *process_pool;       /*attr, default: "false"*/
-       const char *installed_storage;
-       const char *autorestart;        /*attr, default: "false"*/
-       const char *onboot;     /*attr, default: "false"*/
-       const char *support_disable;    /*set from package_x*/
-       const char *ui_gadget;  /*attr, default: "false"*/
-       const char *launch_mode;        /*attr, default: "single"*/
-       const char *ambient_support;    /*attr, default: "false"*/
-       const char *alias_appid;        /*attr*/
-       const char *effective_appid;    /*attr*/
-       const char *package_type;       /*set from package_x*/
-       const char *tep_name;   /*set from package_x*/
-       const char *root_path;  /*set from package_x*/
-       const char *api_version;        /*set from package_x*/
-       const char *for_all_users; /**< Flag that indicates if the package is available for everyone or for current user only, no xml part*/
+       char *appid;    /*attr*/
+       char *exec;     /*attr*/
+       char *nodisplay;        /*attr, default: "false"*/
+       char *multiple; /*attr, default: "false"*/
+       char *taskmanage;       /*attr, default: "true"*/
+       char *enabled;  /*attr, default: "true"*/
+       char *type;     /*attr*/
+       char *categories;       /*attr*/
+       char *extraid;  /*attr*/
+       char *hwacceleration;   /*attr, default: "default"*/
+       char *screenreader;     /*attr, default: "use-system-setting"*/
+       char *mainapp;  /*attr, default: "false"*/
+       char *package;  /*set from package_x*/
+       char *recentimage;      /*attr, default: "false"*/
+       char *launchcondition;  /*attr, default: "false"*/
+       char *indicatordisplay; /*attr, default: "true"*/
+       char *portraitimg;      /*attr*/
+       char *landscapeimg;     /*attr*/
+       char *effectimage_type; /*attr, default: "image"*/
+       char *guestmode_visibility;     /*attr, default: "true"*/
+       char *component;        /*no xml part*/
+       char *permission_type;  /*attr, default: "normal"*/
+       char *component_type;   /*attr, default: "uiapp"*/
+       char *preload;  /*no xml part*/
+       char *submode;  /*attr, default: "false"*/
+       char *submode_mainid;   /*attr, default: "false"*/
+       char *process_pool;     /*attr, default: "false"*/
+       char *installed_storage;
+       char *autorestart;      /*attr, default: "false"*/
+       char *onboot;   /*attr, default: "false"*/
+       char *support_disable;  /*set from package_x*/
+       char *ui_gadget;        /*attr, default: "false"*/
+       char *launch_mode;      /*attr, default: "single"*/
+       char *ambient_support;  /*attr, default: "false"*/
+       char *alias_appid;      /*attr*/
+       char *effective_appid;  /*attr*/
+       char *package_type;     /*set from package_x*/
+       char *tep_name; /*set from package_x*/
+       char *root_path;        /*set from package_x*/
+       char *api_version;      /*set from package_x*/
+       char *for_all_users; /**< Flag that indicates if the package is available for everyone or for current user only, no xml part*/
        GList *label;   /*element*/
        GList *icon;    /*element*/
        GList *image;   /*element*/
@@ -157,31 +157,31 @@ typedef struct application_x {
 } application_x;
 
 typedef struct package_x {
-       const char *for_all_users;              /**< Flag that indicates if the package is available for everyone or for current user only, no xml part*/
-       const char *package;            /**< package name, attr*/
-       const char *version;            /**< package version, attr*/
-       const char *installlocation;            /**< package install location, attr, default: "internal-only"*/
-       const char *ns;         /**<name space, attr*/
-       const char *removable;          /**< package removable flag, no xml part*/
-       const char *preload;            /**< package preload flag, no xml part*/
-       const char *readonly;           /**< package readonly flag, no xml part*/
-       const char *update;                     /**< package update flag, no xml part*/
-       const char *appsetting;         /**< package app setting flag, attr, default: "false"*/
-       const char *system;             /**< package system flag, no xml part*/
-       const char *type;               /**< package type, attr*/
-       const char *package_size;               /**< package size for external installation, attr*/
-       const char *installed_time;             /**< installed time after finishing of installation, no xml part*/
-       const char *installed_storage;          /**< package currently installed storage, no xml part*/
-       const char *storeclient_id;             /**< id of store client for installed package, attr*/
-       const char *mainapp_id;         /**< app id of main application, no xml part*/
-       const char *package_url;                /**< app id of main application, attr*/
-       const char *root_path;          /**< package root path, attr*/
-       const char *csc_path;           /**< package csc path, attr*/
-       const char *nodisplay_setting;          /**< package no display setting menu, attr, default: "false"*/
-       const char *support_disable;            /**< package support disable flag, attr, default: "false"*/
-       const char *api_version;                /**< minimum version of API package using, attr, default: patch_version trimmed version from tizen_full_version*/
-       const char *tep_name;   /*no xml part*/
-       const char *backend_installer;          /**< package backend installer, attr*/
+       char *for_all_users;            /**< Flag that indicates if the package is available for everyone or for current user only, no xml part*/
+       char *package;          /**< package name, attr*/
+       char *version;          /**< package version, attr*/
+       char *installlocation;          /**< package install location, attr, default: "internal-only"*/
+       char *ns;               /**<name space, attr*/
+       char *removable;                /**< package removable flag, no xml part*/
+       char *preload;          /**< package preload flag, no xml part*/
+       char *readonly;         /**< package readonly flag, no xml part*/
+       char *update;                   /**< package update flag, no xml part*/
+       char *appsetting;               /**< package app setting flag, attr, default: "false"*/
+       char *system;           /**< package system flag, no xml part*/
+       char *type;             /**< package type, attr*/
+       char *package_size;             /**< package size for external installation, attr*/
+       char *installed_time;           /**< installed time after finishing of installation, no xml part*/
+       char *installed_storage;                /**< package currently installed storage, no xml part*/
+       char *storeclient_id;           /**< id of store client for installed package, attr*/
+       char *mainapp_id;               /**< app id of main application, no xml part*/
+       char *package_url;              /**< app id of main application, attr*/
+       char *root_path;                /**< package root path, attr*/
+       char *csc_path;         /**< package csc path, attr*/
+       char *nodisplay_setting;                /**< package no display setting menu, attr, default: "false"*/
+       char *support_disable;          /**< package support disable flag, attr, default: "false"*/
+       char *api_version;              /**< minimum version of API package using, attr, default: patch_version trimmed version from tizen_full_version*/
+       char *tep_name; /*no xml part*/
+       char *backend_installer;                /**< package backend installer, attr*/
        GList *icon;            /**< package icon, element*/
        GList *label;           /**< package label, element*/
        GList *author;          /**< package author, element*/
index f26655f..ad90456 100644 (file)
@@ -219,7 +219,7 @@ int __open_manifest_db(uid_t uid, bool readonly);
 int __close_cert_db(void);
 int __open_cert_db(uid_t uid, bool readonly);
 void _save_column_int(sqlite3_stmt *stmt, int idx, int *i);
-void _save_column_str(sqlite3_stmt *stmt, int idx, const char **str);
+void _save_column_str(sqlite3_stmt *stmt, int idx, char **str);
 char *_get_system_locale(void);
 void __get_filter_condition(gpointer data, char **condition);
 
index e2bcc91..d4cf708 100644 (file)
@@ -48,7 +48,7 @@
 #endif
 #define LOG_TAG "PKGMGR_PARSER"
 
-#define ASCII(s) (const char *)s
+#define ASCII(s) (char *)s
 #define XMLCHAR(s) (const xmlChar *)s
 
 //#define METADATA_PARSER_LIST SYSCONFDIR "/package-manager/parserlib/metadata/metadata_parser_list.txt"
@@ -75,16 +75,16 @@ typedef enum {
 const char *package;
 
 static int __ps_process_label(xmlTextReaderPtr reader, label_x *label);
-static int __ps_process_privilege(xmlTextReaderPtr reader, const char **privilege);
+static int __ps_process_privilege(xmlTextReaderPtr reader, char **privilege);
 static int __ps_process_privileges(xmlTextReaderPtr reader, GList **privileges);
-static int __ps_process_allowed(xmlTextReaderPtr reader, const char **allowed);
-static int __ps_process_condition(xmlTextReaderPtr reader, const char **condition);
+static int __ps_process_allowed(xmlTextReaderPtr reader, char **allowed);
+static int __ps_process_condition(xmlTextReaderPtr reader, char **condition);
 static int __ps_process_notification(xmlTextReaderPtr reader, notification_x *notifiation);
-static int __ps_process_category(xmlTextReaderPtr reader, const char **category);
+static int __ps_process_category(xmlTextReaderPtr reader, char **category);
 static int __ps_process_metadata(xmlTextReaderPtr reader, metadata_x *metadata);
 static int __ps_process_permission(xmlTextReaderPtr reader, permission_x *permission);
 static int __ps_process_compatibility(xmlTextReaderPtr reader, compatibility_x *compatibility);
-static int __ps_process_request(xmlTextReaderPtr reader, const char **request);
+static int __ps_process_request(xmlTextReaderPtr reader, char **request);
 static int __ps_process_define(xmlTextReaderPtr reader, define_x *define);
 static int __ps_process_launchconditions(xmlTextReaderPtr reader, GList **launchconditions);
 static int __ps_process_datashare(xmlTextReaderPtr reader, datashare_x *datashare);
@@ -103,7 +103,7 @@ static char *__get_parser_plugin(const char *type);
 static int __ps_run_parser(xmlDocPtr docPtr, const char *tag, ACTION_TYPE action, const char *pkgid);
 API int __is_admin();
 
-static void __save_xml_attribute(xmlTextReaderPtr reader, char *attribute, const char **xml_attribute, char *default_value)
+static void __save_xml_attribute(xmlTextReaderPtr reader, char *attribute, char **xml_attribute, char *default_value)
 {
        xmlChar *attrib_val = xmlTextReaderGetAttribute(reader, XMLCHAR(attribute));
        if (attrib_val) {
@@ -116,7 +116,7 @@ static void __save_xml_attribute(xmlTextReaderPtr reader, char *attribute, const
        }
 }
 
-static void __save_xml_lang(xmlTextReaderPtr reader, const char **xml_attribute)
+static void __save_xml_lang(xmlTextReaderPtr reader, char **xml_attribute)
 {
        const xmlChar *attrib_val = xmlTextReaderConstXmlLang(reader);
        if (attrib_val != NULL)
@@ -125,7 +125,7 @@ static void __save_xml_lang(xmlTextReaderPtr reader, const char **xml_attribute)
                *xml_attribute = strdup(DEFAULT_LOCALE);
 }
 
-static void __save_xml_value(xmlTextReaderPtr reader, const char **xml_attribute)
+static void __save_xml_value(xmlTextReaderPtr reader, char **xml_attribute)
 {
        xmlTextReaderRead(reader);
        const xmlChar *attrib_val = xmlTextReaderConstValue(reader);
@@ -1055,13 +1055,13 @@ int __ps_process_category_parser(manifest_x *mfx, ACTION_TYPE action)
        return ret;
 }
 
-static int __ps_process_allowed(xmlTextReaderPtr reader, const char **allowed)
+static int __ps_process_allowed(xmlTextReaderPtr reader, char **allowed)
 {
        __save_xml_value(reader, allowed);
        return 0;
 }
 
-static int __ps_process_condition(xmlTextReaderPtr reader, const char **condition)
+static int __ps_process_condition(xmlTextReaderPtr reader, char **condition)
 {
        __save_xml_attribute(reader, "name", condition, NULL);
        return 0;
@@ -1074,13 +1074,13 @@ static int __ps_process_notification(xmlTextReaderPtr reader, notification_x *no
        return 0;
 }
 
-static int __ps_process_category(xmlTextReaderPtr reader, const char **category)
+static int __ps_process_category(xmlTextReaderPtr reader, char **category)
 {
        __save_xml_attribute(reader, "name", category, NULL);
        return 0;
 }
 
-static int __ps_process_privilege(xmlTextReaderPtr reader, const char **privilege)
+static int __ps_process_privilege(xmlTextReaderPtr reader, char **privilege)
 {
        __save_xml_value(reader, privilege);
        return 0;
@@ -1107,7 +1107,7 @@ static int __ps_process_compatibility(xmlTextReaderPtr reader, compatibility_x *
        return 0;
 }
 
-static int __ps_process_request(xmlTextReaderPtr reader, const char **request)
+static int __ps_process_request(xmlTextReaderPtr reader, char **request)
 {
        __save_xml_value(reader, request);
        return 0;
@@ -1118,7 +1118,7 @@ static int __ps_process_define(xmlTextReaderPtr reader, define_x *define)
        const xmlChar *node;
        int ret = -1;
        int depth = -1;
-       const char *val;
+       char *val;
 
        __save_xml_attribute(reader, "path", &define->path, NULL);
 
@@ -1237,7 +1237,7 @@ static int __ps_process_appcontrol(xmlTextReaderPtr reader, GList **appcontrol)
        const xmlChar *node;
        int ret = -1;
        int depth = -1;
-       const char *val;
+       char *val;
        GList *operations = NULL;
        GList *uris = NULL;
        GList *mimes = NULL;
@@ -1300,7 +1300,7 @@ static int __ps_process_privileges(xmlTextReaderPtr reader, GList **privileges)
        const xmlChar *node;
        int ret = -1;
        int depth = -1;
-       const char *val;
+       char *val;
 
        depth = xmlTextReaderDepth(reader);
        while ((ret = __next_child_element(reader, depth))) {
@@ -1330,7 +1330,7 @@ static int __ps_process_launchconditions(xmlTextReaderPtr reader, GList **launch
        const xmlChar *node;
        int ret = -1;
        int depth = -1;
-       const char *val;
+       char *val;
 
        depth = xmlTextReaderDepth(reader);
        while ((ret = __next_child_element(reader, depth))) {
@@ -1361,7 +1361,7 @@ static int __ps_process_datashare(xmlTextReaderPtr reader, datashare_x *datashar
        const xmlChar *node;
        int ret = -1;
        int depth = -1;
-       const char *val;
+       char *val;
        depth = xmlTextReaderDepth(reader);
        while ((ret = __next_child_element(reader, depth))) {
                node = xmlTextReaderConstName(reader);
@@ -1537,10 +1537,10 @@ static int __ps_process_icon(xmlTextReaderPtr reader, icon_x *icon, uid_t uid)
        __save_xml_lang(reader, &icon->lang);
 
        xmlTextReaderRead(reader);
-       const char *text  = ASCII(xmlTextReaderValue(reader));
+       char *text  = ASCII(xmlTextReaderValue(reader));
        if (text) {
-               icon->text = (const char *)__get_icon_with_path(text, uid);
-               free((void *)text);
+               icon->text = __get_icon_with_path(text, uid);
+               free(text);
        }
 
        return 0;
@@ -1644,7 +1644,7 @@ static int __ps_process_application(xmlTextReaderPtr reader, application_x *appl
        const xmlChar *node;
        int ret = -1;
        int depth = -1;
-       const char *val;
+       char *val;
 
        __save_xml_attribute(reader, "appid", &application->appid, NULL);
        retvm_if(application->appid == NULL, PM_PARSER_R_ERROR, "appid cant be NULL, appid field is mandatory\n");
index 7215c92..4c010ab 100644 (file)
@@ -693,7 +693,7 @@ static gint __check_icon_folder(const char *orig_icon_path, char **new_icon_path
        if (icon_filename == NULL)
                return -1;
 
-       snprintf(icon_path, strlen(orig_icon_path) - (strlen(icon_filename) - 1), orig_icon_path);
+       snprintf(icon_path, strlen(orig_icon_path) - (strlen(icon_filename) - 1), "%s", orig_icon_path);
        for (i = 0; i < 2; i++) {
                snprintf(modified_iconpath, BUFSIZE - 1, "%s/%s%s", icon_path, dpi_path[i], icon_filename);
                if (access(modified_iconpath, F_OK) != -1) {
index 79dc42e..5003e2f 100644 (file)
@@ -124,7 +124,7 @@ static gint _appinfo_get_list(sqlite3 *db, const char *locale,
        }
 
        while (sqlite3_step(stmt) == SQLITE_ROW) {
-               _save_column_str(stmt, 0, (const char **)&appid);
+               _save_column_str(stmt, 0, &appid);
                if (appid != NULL)
                        *list = g_list_insert_sorted(*list, appid,
                                        __list_strcmp);
@@ -309,7 +309,7 @@ static int _appinfo_get_category(sqlite3 *db, const char *appid,
        int ret;
        char *query;
        sqlite3_stmt *stmt;
-       const char *val;
+       char *val;
 
        query = sqlite3_mprintf(query_raw, appid);
        if (query == NULL) {
@@ -394,7 +394,7 @@ static int _appinfo_get_app_control(sqlite3 *db, const char *appid,
 
        while (sqlite3_step(stmt) == SQLITE_ROW) {
                str = NULL;
-               _save_column_str(stmt, 0, (const char **)&str);
+               _save_column_str(stmt, 0, &str);
                /* TODO: revise */
                __parse_appcontrol(appcontrol, str);
                free(str);
@@ -539,7 +539,7 @@ static int _appinfo_get_splashscreens(sqlite3 *db, const char *appid,
        return PMINFO_R_OK;
 }
 
-static GList *__get_background_category(char *value)
+static GList *__get_background_category(const char *value)
 {
        GList *category_list = NULL;
        int convert_value = 0;
@@ -672,6 +672,7 @@ static int _appinfo_get_application(sqlite3 *db, const char *appid,
        _save_column_str(stmt, idx++, &info->api_version);
 
        info->background_category = __get_background_category(bg_category_str);
+       free(bg_category_str);
 
        if (_appinfo_get_label(db, info->appid, locale, &info->label)) {
                pkgmgrinfo_basic_free_application(info);
@@ -857,6 +858,7 @@ int _appinfo_get_applist(uid_t uid, const char *locale, GHashTable **appinfo_tab
                _save_column_str(stmt, idx++, &appinfo->api_version);
 
                appinfo->background_category = __get_background_category(bg_category_str);
+               free(bg_category_str);
 
                if (_appinfo_get_splashscreens(db, appinfo->appid, &appinfo->splashscreens)) {
                        pkgmgrinfo_basic_free_application(appinfo);
@@ -941,7 +943,7 @@ API int pkgmgrinfo_appinfo_get_appinfo(const char *appid, pkgmgrinfo_appinfo_h *
 static gpointer __copy_str(gconstpointer src, gpointer data)
 {
        const char *tmp = (const char *)src;
-       const char *buffer;
+       char *buffer;
 
        buffer = strdup(tmp);
        if (buffer == NULL) {
@@ -1417,7 +1419,7 @@ API int pkgmgrinfo_appinfo_get_usr_applist_for_amd(pkgmgrinfo_app_list_cb app_fu
        }
 
        g_hash_table_iter_init(&iter, appinfo_table);
-       while (g_hash_table_iter_next(&iter, &key, &val)) {
+       while (g_hash_table_iter_next(&iter, (gpointer)&key, (gpointer)&val)) {
                ret = app_func((void *)val, user_data);
                if (ret != PMINFO_R_OK) {
                        LOGE("callback is stopped");
index 091d898..367a428 100644 (file)
@@ -189,7 +189,7 @@ static int _pkginfo_get_pkgid_from_appid(uid_t uid, const char *appid,
 
        ret = sqlite3_step(stmt);
        if (ret == SQLITE_ROW) {
-               _save_column_str(stmt, 0, (const char **)pkgid);
+               _save_column_str(stmt, 0, pkgid);
                ret = PMINFO_R_OK;
        } else if (ret == SQLITE_DONE) {
                _LOGE("cannot find pkgid of app %s", appid);
@@ -288,7 +288,7 @@ static int _pkginfo_get_cert(sqlite3 *db, int cert_id[],
                        return PMINFO_R_ERROR;
                }
 
-               _save_column_str(stmt, 0, (const char **)&cert_info[i]);
+               _save_column_str(stmt, 0, &cert_info[i]);
                sqlite3_reset(stmt);
                sqlite3_clear_bindings(stmt);
        }
index 7c02c30..805d2ed 100644 (file)
@@ -448,7 +448,7 @@ void _save_column_int(sqlite3_stmt *stmt, int idx, int *i)
        *i = sqlite3_column_int(stmt, idx);
 }
 
-void _save_column_str(sqlite3_stmt *stmt, int idx, const char **str)
+void _save_column_str(sqlite3_stmt *stmt, int idx, char **str)
 {
        const char *val;
 
index 9cdc260..12642e8 100644 (file)
@@ -227,7 +227,7 @@ static int _pkginfo_get_list(sqlite3 *db, const char *locale,
        }
 
        while (sqlite3_step(stmt) == SQLITE_ROW) {
-               _save_column_str(stmt, 0, (const char **)&pkgid);
+               _save_column_str(stmt, 0, &pkgid);
                if (pkgid != NULL)
                        *list = g_list_insert_sorted(*list, pkgid,
                                        __list_strcmp);
@@ -565,7 +565,7 @@ static int _pkginfo_get_privilege(sqlite3 *db, const char *pkgid,
        int ret;
        char *query;
        sqlite3_stmt *stmt;
-       const char *privilege;
+       char *privilege;
 
        query = sqlite3_mprintf(query_raw, pkgid);
        if (query == NULL) {