ivi-resource-mananger: fix a few warnings.
authorKrisztian Litkey <kli@iki.fi>
Sat, 25 Oct 2014 11:21:59 +0000 (14:21 +0300)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:18 +0000 (18:37 +0200)
Change-Id: Ib5afbf266b2282614c00fea46d36a51632521120

src/plugins/ivi-resource-manager/appid.c
src/plugins/ivi-resource-manager/plugin-ivi-resource-manager.c

index 422cc21..5306245 100644 (file)
@@ -72,9 +72,9 @@ mrp_resmgr_appid_t *mrp_resmgr_appid_create(mrp_resmgr_data_t *data)
     mrp_htbl_config_t cfg;
 
 #ifdef TZCONFIG_ENABLED
-    char *app_dir = tzplatform_getenv(TZ_USER_APP);
+    const char *app_dir = tzplatform_getenv(TZ_USER_APP);
 #else
-    char *app_dir = "/usr/app";
+    const char *app_dir = "/usr/app";
 #endif
 
     cfg.nentry = APP_MAX;
index d486f28..f08a13d 100644 (file)
@@ -341,7 +341,9 @@ static int hash_compare(const void *key1, const void *key2)
 
 static uint32_t hash_function(const void *key)
 {
-    return (uint32_t)(((uint64_t)key >> 4) & 0xffffffff);
+    uint64_t k = (ptrdiff_t)key;
+
+    return (uint32_t)((k >> 4) & 0xffffffff);
 }