summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-05-29 19:54:22 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-05-29 20:30:43 +0900
commit3f0388a8e60d0b9f82322973234ec253e9c963ff (patch)
tree82c21212c7e1be744228767c1e05d11984e451b5
parent1c007ce0e5566812e94a31c327b53b45fbf998a7 (diff)
downloadefl-3f0388a8e60d0b9f82322973234ec253e9c963ff.tar.gz
Win64: Fix a bunch of warnings
Fix invalid casts. Use printf("%z") where appropriate. Fix unused variables warnings. Thanks vtorri for the patch. @fix
-rw-r--r--src/lib/ecore_con/ecore_con_url.c4
-rw-r--r--src/lib/eina/eina_thread.c4
-rw-r--r--src/lib/eio/eio_monitor_win32.c2
-rw-r--r--src/lib/eo/eo.c9
-rw-r--r--src/lib/evas/common/evas_image_main.c3
5 files changed, 12 insertions, 10 deletions
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index ffaa6bb40a..23bc07c8aa 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -1492,11 +1492,7 @@ _ecore_con_url_read_cb(void *ptr, size_t size, size_t nitems, void *stream)
fclose((FILE *)stream);
return 0;
}
-#ifdef _WIN32
- INF("*** We read %Iu bytes from file", retcode);
-#else
INF("*** We read %zu bytes from file", retcode);
-#endif
return retcode;
}
diff --git a/src/lib/eina/eina_thread.c b/src/lib/eina/eina_thread.c
index 5ba6c57e69..511abb8a25 100644
--- a/src/lib/eina/eina_thread.c
+++ b/src/lib/eina/eina_thread.c
@@ -85,7 +85,7 @@ _eina_thread_tls_keys_clean(Eina_Thread_Win32 *tw)
EINA_LIST_FREE(tw->tls_keys, data)
{
- Eina_TLS key = data;
+ Eina_TLS key = (Eina_TLS)(uintptr_t)data;
cb = _eina_thread_tls_cb_find(key);
if (cb)
cb->cb(eina_tls_get(key));
@@ -129,7 +129,7 @@ _eina_thread_tls_key_add(Eina_TLS key)
EINA_LIST_FOREACH(_thread_running, l, tw)
if (tw->thread == t)
{
- void *data = key;
+ void *data = (void *)(uintptr_t)key;
if (!eina_list_data_find(tw->tls_keys, data))
tw->tls_keys = eina_list_append(tw->tls_keys, data);
return EINA_TRUE;
diff --git a/src/lib/eio/eio_monitor_win32.c b/src/lib/eio/eio_monitor_win32.c
index d8c84051bf..327c6c75a5 100644
--- a/src/lib/eio/eio_monitor_win32.c
+++ b/src/lib/eio/eio_monitor_win32.c
@@ -202,7 +202,7 @@ _eio_monitor_win32_watcher_new(Eio_Monitor *monitor,
if (!w) return NULL;
if (!monitor_parent)
- monitored = current;
+ monitored = (char *)current;
else
{
char *tmp;
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 36f322841b..19a0e997c1 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -324,6 +324,8 @@ _eo_call_stack_mem_resize(void **ptr EINA_UNUSED, size_t newsize, size_t maxsize
MEM_PAGE_SIZE);
madvise(((unsigned char *)*ptr) + addr, maxsize - addr, MADV_DONTNEED);
#else
+ (void)newsize;
+ (void)maxsize;
// just grow in regular cases
#endif
}
@@ -335,6 +337,7 @@ _eo_call_stack_mem_free(void *ptr, size_t maxsize)
// free mmaped memory
munmap(ptr, maxsize);
#else
+ (void)maxsize;
// free regular memory
free(ptr);
#endif
@@ -723,7 +726,7 @@ _eo_api_desc_get(const void *api_func, const _Eo_Class *klass, const _Eo_Class *
* them. We fallback to plain string comparison based on the
* function name itself. Slow, but this should rarely happen.
*/
- for (int i = 0; i < cur_klass->desc->ops.count; i++)
+ for (unsigned int i = 0; i < cur_klass->desc->ops.count; i++)
if (op_descs[i].api_name && !strcmp(api_name, op_descs[i].api_name))
{
if (op_descs[i].api_func == NULL || op_descs[i].api_func == ((void (*)())-1))
@@ -1649,7 +1652,7 @@ _eo_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj)
#endif
if (obj->datarefcount == 0)
{
- ERR("Data for object %lx (%s) is already not referenced.", (unsigned long) _eo_id_get(obj), obj->klass->desc->name);
+ ERR("Data for object %zx (%s) is already not referenced.", (size_t)_eo_id_get(obj), obj->klass->desc->name);
}
else
{
@@ -1670,7 +1673,7 @@ _eo_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj)
}
else
{
- ERR("ref_obj (0x%lx) does not reference data (%p) of obj (0x%lx).", (unsigned long) _eo_id_get(ref_obj), data, (unsigned long)_eo_id_get(obj));
+ ERR("ref_obj (0x%zx) does not reference data (%p) of obj (0x%zx).", (size_t)_eo_id_get(ref_obj), data, (size_t)_eo_id_get(obj));
}
#else
(void) ref_obj;
diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c
index 2ce8370b63..e375675bfc 100644
--- a/src/lib/evas/common/evas_image_main.c
+++ b/src/lib/evas/common/evas_image_main.c
@@ -192,6 +192,9 @@ _evas_common_rgba_image_surface_munmap(void *data, unsigned int w, unsigned int
else
munmap(data, siz);
#else
+ (void)w;
+ (void)h;
+ (void)cspace;
free(data);
#endif
}