ecore: remove some warning.

SVN revision: 65445
This commit is contained in:
Cedric BAIL 2011-11-20 14:44:05 +00:00
parent 63c47ef28e
commit 61f1be3463
2 changed files with 41 additions and 8 deletions

View File

@ -340,7 +340,7 @@ _ecore_getopt_help_desc_setup_metavar(const Ecore_Getopt_Desc *desc,
*metavarlen = maxsize - 1;
for (i = 0; i < *metavarlen; i++)
metavar[i] = toupper(desc->longname[i]);
metavar[i] = toupper((int) desc->longname[i]);
metavar[i] = '\0';
}
}

View File

@ -789,9 +789,9 @@ restart:
static Ecore_Pthread_Worker *
_ecore_thread_worker_new(void)
{
#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *result;
#ifdef EFL_HAVE_THREADS
result = eina_trash_pop(&_ecore_thread_worker_trash);
if (!result) result = malloc(sizeof (Ecore_Pthread_Worker));
@ -1071,6 +1071,7 @@ on_exit:
((Ecore_Pthread_Worker *)thread)->cancel = EINA_TRUE;
return EINA_FALSE;
#else
(void) thread;
return EINA_TRUE;
#endif
}
@ -1279,8 +1280,9 @@ ecore_thread_active_get(void)
EAPI int
ecore_thread_pending_get(void)
{
int ret;
#ifdef EFL_HAVE_THREADS
int ret;
LKL(_ecore_pending_job_threads_mutex);
ret = eina_list_count(_ecore_pending_job_threads);
LKU(_ecore_pending_job_threads_mutex);
@ -1293,8 +1295,9 @@ ecore_thread_pending_get(void)
EAPI int
ecore_thread_pending_feedback_get(void)
{
int ret;
#ifdef EFL_HAVE_THREADS
int ret;
LKL(_ecore_pending_job_threads_mutex);
ret = eina_list_count(_ecore_pending_job_threads_feedback);
LKU(_ecore_pending_job_threads_mutex);
@ -1307,8 +1310,9 @@ ecore_thread_pending_feedback_get(void)
EAPI int
ecore_thread_pending_total_get(void)
{
int ret;
#ifdef EFL_HAVE_THREADS
int ret;
LKL(_ecore_pending_job_threads_mutex);
ret = eina_list_count(_ecore_pending_job_threads) + eina_list_count(_ecore_pending_job_threads_feedback);
LKU(_ecore_pending_job_threads_mutex);
@ -1343,8 +1347,9 @@ ecore_thread_max_reset(void)
EAPI int
ecore_thread_available_get(void)
{
int ret;
#ifdef EFL_HAVE_THREADS
int ret;
LKL(_ecore_pending_job_threads_mutex);
ret = _ecore_thread_count_max - _ecore_thread_count;
LKU(_ecore_pending_job_threads_mutex);
@ -1361,9 +1366,11 @@ ecore_thread_local_data_add(Ecore_Thread *thread,
Eina_Free_Cb cb,
Eina_Bool direct)
{
#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
Ecore_Thread_Data *d;
Eina_Bool ret;
#endif
if ((!thread) || (!key) || (!value))
return EINA_FALSE;
@ -1389,7 +1396,9 @@ ecore_thread_local_data_add(Ecore_Thread *thread,
CDB(worker->cond);
return ret;
#else
return EINA_TRUE;
(void) cb;
(void) direct;
return EINA_FALSE;
#endif
}
@ -1399,9 +1408,12 @@ ecore_thread_local_data_set(Ecore_Thread *thread,
void *value,
Eina_Free_Cb cb)
{
#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
Ecore_Thread_Data *d, *r;
void *ret;
#endif
if ((!thread) || (!key) || (!value))
return NULL;
#ifdef EFL_HAVE_THREADS
@ -1425,6 +1437,7 @@ ecore_thread_local_data_set(Ecore_Thread *thread,
free(r);
return ret;
#else
(void) cb;
return NULL;
#endif
}
@ -1433,8 +1446,10 @@ EAPI void *
ecore_thread_local_data_find(Ecore_Thread *thread,
const char *key)
{
#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
Ecore_Thread_Data *d;
#endif
if ((!thread) || (!key))
return NULL;
@ -1457,7 +1472,10 @@ EAPI Eina_Bool
ecore_thread_local_data_del(Ecore_Thread *thread,
const char *key)
{
#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
#endif
if ((!thread) || (!key))
return EINA_FALSE;
#ifdef EFL_HAVE_THREADS
@ -1477,8 +1495,10 @@ ecore_thread_global_data_add(const char *key,
Eina_Free_Cb cb,
Eina_Bool direct)
{
Eina_Bool ret;
#ifdef EFL_HAVE_THREADS
Ecore_Thread_Data *d;
Eina_Bool ret;
#endif
if ((!key) || (!value))
return EINA_FALSE;
@ -1505,6 +1525,8 @@ ecore_thread_global_data_add(const char *key,
CDB(_ecore_thread_global_hash_cond);
return ret;
#else
(void) cb;
(void) direct;
return EINA_TRUE;
#endif
}
@ -1514,8 +1536,10 @@ ecore_thread_global_data_set(const char *key,
void *value,
Eina_Free_Cb cb)
{
#ifdef EFL_HAVE_THREADS
Ecore_Thread_Data *d, *r;
void *ret;
#endif
if ((!key) || (!value))
return NULL;
@ -1543,6 +1567,7 @@ ecore_thread_global_data_set(const char *key,
free(r);
return ret;
#else
(void) cb;
return NULL;
#endif
}
@ -1550,7 +1575,10 @@ ecore_thread_global_data_set(const char *key,
EAPI void *
ecore_thread_global_data_find(const char *key)
{
#ifdef EFL_HAVE_THREADS
Ecore_Thread_Data *ret;
#endif
if (!key)
return NULL;
#ifdef EFL_HAVE_THREADS
@ -1570,7 +1598,9 @@ ecore_thread_global_data_find(const char *key)
EAPI Eina_Bool
ecore_thread_global_data_del(const char *key)
{
#ifdef EFL_HAVE_THREADS
Eina_Bool ret;
#endif
if (!key)
return EINA_FALSE;
@ -1591,8 +1621,10 @@ EAPI void *
ecore_thread_global_data_wait(const char *key,
double seconds)
{
#ifdef EFL_HAVE_THREADS
double tm = 0;
Ecore_Thread_Data *ret = NULL;
#endif
if (!key)
return NULL;
@ -1627,6 +1659,7 @@ ecore_thread_global_data_wait(const char *key,
if (ret) return ret->data;
return NULL;
#else
(void) seconds;
return NULL;
#endif
}