diff --git a/src/bin/elementary/perf.c b/src/bin/elementary/perf.c --- a/src/bin/elementary/perf.c +++ b/src/bin/elementary/perf.c @@ -151,7 +151,7 @@ int p; evas_output_viewport_get(e, NULL, NULL, &win_w, &win_h); - if (test_pos >= eina_array_count_get(tests_to_do)) + if (test_pos >= eina_array_count(tests_to_do)) { printf("--------------------------------------------------------------------------------\n"); printf("Average weighted FPS: %1.2f\n", tests_fps / tests_weights); diff --git a/src/lib/efl_mono/efl_mono_model_internal.c b/src/lib/efl_mono/efl_mono_model_internal.c --- a/src/lib/efl_mono/efl_mono_model_internal.c +++ b/src/lib/efl_mono/efl_mono_model_internal.c @@ -60,7 +60,7 @@ static int _find_property_index (const char* name, Eina_Array* properties_name) { - int i, size = eina_array_count_get(properties_name); + int i, size = eina_array_count(properties_name); for (i = 0; i != size; ++i) { if (!strcmp(properties_name->data[i], name)) @@ -115,7 +115,7 @@ assert (child != NULL); Efl_Mono_Model_Internal_Child_Data* pcd = efl_data_xref (child, EFL_MONO_MODEL_INTERNAL_CHILD_CLASS, obj); pcd->model_pd = pd; - pcd->index = eina_array_count_get(pd->items); + pcd->index = eina_array_count(pd->items); pcd->child = child; pcd->values = eina_array_new(5); eina_array_push (pd->items, pcd); @@ -126,7 +126,7 @@ static unsigned int _efl_mono_model_internal_efl_model_children_count_get(const Eo *obj EINA_UNUSED, Efl_Mono_Model_Internal_Data *pd) { - return eina_array_count_get(pd->items); + return eina_array_count(pd->items); } static Eina_Future * @@ -140,7 +140,7 @@ if (i >= 0) { - for (j = i - eina_array_count_get (pd->values); j >= 0; --j) + for (j = i - eina_array_count(pd->values); j >= 0; --j) { eina_array_push (pd->values, (void*)1); pd->values->data[pd->values->count-1] = NULL; @@ -168,7 +168,7 @@ _efl_mono_model_internal_child_efl_model_property_get(const Eo *obj EINA_UNUSED, Efl_Mono_Model_Internal_Child_Data *pd EINA_UNUSED, const char *property EINA_UNUSED) { unsigned int i = _find_property_index (property, pd->model_pd->properties_names); - if(eina_array_count_get (pd->values) <= i + if(eina_array_count(pd->values) <= i || eina_array_data_get (pd->values, i) == NULL) return eina_value_error_new(EAGAIN); else diff --git a/src/lib/eina/eina_abi.c b/src/lib/eina/eina_abi.c --- a/src/lib/eina/eina_abi.c +++ b/src/lib/eina/eina_abi.c @@ -25,6 +25,9 @@ #include "eina_unicode.h" #include "eina_safety_checks.h" + +EAPI unsigned int eina_mempool_alignof(unsigned int size); + EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) { return eina_unicode_utf8_next_get(buf, iindex); diff --git a/src/lib/eina/eina_accessor.c b/src/lib/eina/eina_accessor.c --- a/src/lib/eina/eina_accessor.c +++ b/src/lib/eina/eina_accessor.c @@ -53,6 +53,8 @@ * Global * *============================================================================*/ +Eina_Bool eina_accessor_init(void); +Eina_Bool eina_accessor_shutdown(void); /** * @internal * @brief Initialize the accessor module. diff --git a/src/lib/eina/eina_array.h b/src/lib/eina/eina_array.h --- a/src/lib/eina/eina_array.h +++ b/src/lib/eina/eina_array.h @@ -397,7 +397,7 @@ * @c NULL or invalid, the program may crash. * */ -static inline unsigned int eina_array_count_get(const Eina_Array *array) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +static inline unsigned int eina_array_count_get(const Eina_Array *array) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT EINA_DEPRECATED; /** * @brief Returns the number of elements in an array. diff --git a/src/lib/eina/eina_binshare.c b/src/lib/eina/eina_binshare.c --- a/src/lib/eina/eina_binshare.c +++ b/src/lib/eina/eina_binshare.c @@ -72,6 +72,9 @@ * Global * *============================================================================*/ +EAPI Eina_Bool eina_binshare_init(void); +EAPI Eina_Bool eina_binshare_shutdown(void); + /** * @internal * @brief Initialize the share_common module. diff --git a/src/lib/eina/eina_counter.c b/src/lib/eina/eina_counter.c --- a/src/lib/eina/eina_counter.c +++ b/src/lib/eina/eina_counter.c @@ -77,7 +77,7 @@ int n; va_list ap; - tmp = realloc(base, sizeof (char) * (*position + size)); + tmp = realloc(base, sizeof (char) * (size_t)(*position + size)); if (!tmp) return base; @@ -86,7 +86,7 @@ while (1) { va_start(ap, format); - n = vsnprintf(result + *position, size, format, ap); + n = vsnprintf(result + *position, (size_t)size, format, ap); va_end(ap); if (n > -1 && n < size) diff --git a/src/lib/eina/eina_debug_bt.c b/src/lib/eina/eina_debug_bt.c --- a/src/lib/eina/eina_debug_bt.c +++ b/src/lib/eina/eina_debug_bt.c @@ -307,7 +307,7 @@ static int bts = 0; int i; - if (!_trace_t0) _trace_t0 = get_time(); + if (!((_Bool)(_trace_t0))) _trace_t0 = get_time(); // take a lock on grabbing thread debug info like backtraces eina_spinlock_take(&_eina_debug_thread_lock); @@ -317,15 +317,15 @@ _eina_debug_chunk_tmp_reset(); // get an array of pointers for the backtrace array for main + th _bt_buf = _eina_debug_chunk_tmp_push - ((_eina_debug_thread_active_num) * sizeof(void *)); + (((size_t)_eina_debug_thread_active_num) * sizeof(void *)); if (!_bt_buf) goto err; // get an array of pointers for the timespec array for mainloop + th _bt_ts = _eina_debug_chunk_tmp_push - ((_eina_debug_thread_active_num) * sizeof(struct timespec)); + (((size_t)_eina_debug_thread_active_num) * sizeof(struct timespec)); if (!_bt_ts) goto err; // get an array of pointers for the cpuid array for mainloop + th _bt_cpu = _eina_debug_chunk_tmp_push - ((_eina_debug_thread_active_num) * sizeof(int)); + (((size_t)_eina_debug_thread_active_num) * sizeof(int)); if (!_bt_cpu) goto err; // get an array of void ptrs for each thread we know about for bt for (i = 0; i < _eina_debug_thread_active_num; i++) @@ -335,7 +335,7 @@ } // get an array of ints to stor the bt len for mainloop + threads _bt_buf_len = _eina_debug_chunk_tmp_push - ((_eina_debug_thread_active_num) * sizeof(int)); + (((size_t)_eina_debug_thread_active_num) * sizeof(int)); // now collect per thread for (i = 0; i < _eina_debug_thread_active_num; i++) _collect_bt(_eina_debug_thread_active[i].thread); @@ -394,7 +394,7 @@ {"Profiler/on", NULL, &_prof_on_cb}, {"Profiler/off", NULL, &_prof_off_cb}, {NULL, NULL, NULL} -); +) Eina_Bool _eina_debug_bt_init(void) diff --git a/src/lib/eina/eina_debug_bt_file.c b/src/lib/eina/eina_debug_bt_file.c --- a/src/lib/eina/eina_debug_bt_file.c +++ b/src/lib/eina/eina_debug_bt_file.c @@ -65,7 +65,7 @@ if (_table_num >= _table_size) { _table_size += 32; - table2 = _eina_debug_chunk_realloc(_table_size * sizeof(const char *)); + table2 = _eina_debug_chunk_realloc((int)(_table_size * sizeof(const char *))); if (!table2) return NULL; _table = table2; } diff --git a/src/lib/eina/eina_debug_timer.c b/src/lib/eina/eina_debug_timer.c --- a/src/lib/eina/eina_debug_timer.c +++ b/src/lib/eina/eina_debug_timer.c @@ -110,7 +110,7 @@ if (_timers) { Eina_Debug_Timer *t = eina_list_data_get(_timers); - timeout = t->timeout; + timeout = (int)t->timeout; } eina_spinlock_release(&_lock); diff --git a/src/lib/eina/eina_inline_lock_posix.x b/src/lib/eina/eina_inline_lock_posix.x --- a/src/lib/eina/eina_inline_lock_posix.x +++ b/src/lib/eina/eina_inline_lock_posix.x @@ -56,7 +56,7 @@ #include #include #define EINA_LOCK_DEBUG_BT_NUM 64 -typedef void (*Eina_Lock_Bt_Func) (); +typedef void (*Eina_Lock_Bt_Func) (void); #include "eina_inlist.h" #endif @@ -266,7 +266,7 @@ ok = pthread_mutex_lock(&(mutex->mutex)); gettimeofday(&t1, NULL); - dt = (t1.tv_sec - t0.tv_sec) * 1000000; + dt = (int)((t1.tv_sec - t0.tv_sec) * 1000000); if (t1.tv_usec > t0.tv_usec) dt += (t1.tv_usec - t0.tv_usec); else @@ -427,7 +427,7 @@ #endif sec = (time_t)t; - nsec = (t - (double)sec) * 1000000000L; + nsec = ((long)t - (long)sec) * 1000000000L; ts.tv_sec += sec; ts.tv_nsec += nsec; if (ts.tv_nsec > 1000000000L) diff --git a/src/lib/eina/eina_inline_slice.x b/src/lib/eina/eina_inline_slice.x --- a/src/lib/eina/eina_inline_slice.x +++ b/src/lib/eina/eina_inline_slice.x @@ -101,9 +101,9 @@ if (whence == SEEK_SET) { - if ((size_t)offset > slice.len) offset = slice.len; + if ((size_t)offset > slice.len) offset = (ssize_t)slice.len; else if (offset < 0) offset = 0; - ret.len = slice.len - offset; + ret.len = slice.len - (size_t)offset; ret.mem = (const void *)(slice.bytes + offset); } return ret; @@ -125,9 +125,9 @@ if (whence == SEEK_SET) { - if ((size_t)offset > rw_slice.len) offset = rw_slice.len; + if ((size_t)offset > rw_slice.len) offset = (ssize_t)rw_slice.len; else if (offset < 0) offset = 0; - ret.len = rw_slice.len - offset; + ret.len = rw_slice.len - (size_t)offset; ret.mem = (void *)(rw_slice.bytes + offset); } return ret; @@ -172,7 +172,7 @@ if (memcmp(p, n.mem, n.len) == 0) return (const void *)(p - 1); - offset = p - s.bytes; + offset = (size_t)(p - s.bytes); s.bytes += offset; s.len -= offset; continue; diff --git a/src/lib/eina/eina_inline_str.x b/src/lib/eina/eina_inline_str.x --- a/src/lib/eina/eina_inline_str.x +++ b/src/lib/eina/eina_inline_str.x @@ -44,7 +44,7 @@ const char *itr, *str_maxend = str + maxlen; for (itr = str; *itr != '\0'; itr++) if (itr == str_maxend) return (size_t)-1; - return itr - str; + return (size_t)(itr - str); } /** diff --git a/src/lib/eina/eina_inline_stringshare.x b/src/lib/eina/eina_inline_stringshare.x --- a/src/lib/eina/eina_inline_stringshare.x +++ b/src/lib/eina/eina_inline_stringshare.x @@ -127,7 +127,7 @@ { Eina_Slice ret; - ret.len = eina_stringshare_strlen(str); + ret.len = (size_t)eina_stringshare_strlen(str); ret.mem = str; return ret; diff --git a/src/lib/eina/eina_iterator.c b/src/lib/eina/eina_iterator.c --- a/src/lib/eina/eina_iterator.c +++ b/src/lib/eina/eina_iterator.c @@ -56,6 +56,8 @@ * Global * *============================================================================*/ +Eina_Bool eina_iterator_init(void); +Eina_Bool eina_iterator_shutdown(void); /** * @internal * @brief Initialize the iterator module. diff --git a/src/lib/eina/eina_private.h b/src/lib/eina/eina_private.h --- a/src/lib/eina/eina_private.h +++ b/src/lib/eina/eina_private.h @@ -102,7 +102,7 @@ do { \ free(ptr); \ ptr = NULL; \ - } while(0); + } while(0) #undef IF_FREE #define IF_FREE(ptr) \ @@ -111,7 +111,7 @@ free(ptr); \ ptr = NULL; \ } \ - } while(0); + } while(0) #undef IF_FN_DEL #define IF_FN_DEL(_fn, ptr) \ @@ -120,7 +120,7 @@ _fn(ptr); \ ptr = NULL; \ } \ - } while(0); + } while(0) #define MAGIC_FREE(ptr) \ do { \ @@ -128,7 +128,7 @@ EINA_MAGIC_SET(ptr, EINA_MAGIC_NONE); \ FREE(ptr); \ } \ - } while(0); + } while(0) #ifdef EFL_HAVE_THREADS extern Eina_Bool _threads_activated; diff --git a/src/lib/eina/eina_slice.h b/src/lib/eina/eina_slice.h --- a/src/lib/eina/eina_slice.h +++ b/src/lib/eina/eina_slice.h @@ -362,7 +362,7 @@ /** * @brief A null-terminated string for this slice. * - * @param[in] slice the reference memory. + * @param[in] rw_slice the reference memory. * @return newly allocated memory or @c NULL on error * * @since 1.19 diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -732,7 +732,7 @@ #define ARR_APPEND(x) \ if (rc->x != ctx->x) { \ do { \ - c = eina_array_count_get(rc->x); \ + c = eina_array_count(rc->x); \ for (i = 0; i < c; i++) { \ obj = eina_array_data_get(rc->x, i); \ eina_array_push(ctx->x, obj); \ diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c --- a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c +++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c @@ -1648,7 +1648,7 @@ evgl_api_ext_num_extensions_get(int version) { if (version == EVAS_GL_GLES_3_X) - return eina_array_count_get(_gles3_ext_plist); + return eina_array_count(_gles3_ext_plist); return 0; } diff --git a/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.c b/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.c --- a/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.c +++ b/src/modules/evas/engines/software_x11/evas_xlib_swapbuf.c @@ -303,7 +303,7 @@ unsigned int n, i; RGBA_Image *im; - n = eina_array_count_get(&buf->priv.onebuf_regions); + n = eina_array_count(&buf->priv.onebuf_regions); if (n == 0) return; result = alloca(n * sizeof(Eina_Rectangle)); EINA_ARRAY_ITER_NEXT(&buf->priv.onebuf_regions, i, rect, it) diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c --- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c @@ -121,7 +121,7 @@ Eina_Array_Iterator it; /* get number of buffer regions */ - ob->priv.rect_count = eina_array_count_get(&ob->priv.onebuf_regions); + ob->priv.rect_count = eina_array_count(&ob->priv.onebuf_regions); if (ob->priv.rect_count == 0) return; /* allocate rectangles */ diff --git a/src/tests/efl_mono/Model.cs b/src/tests/efl_mono/Model.cs --- a/src/tests/efl_mono/Model.cs +++ b/src/tests/efl_mono/Model.cs @@ -31,8 +31,6 @@ public static void reflection_test () { Efl.Loop loop = Efl.App.AppMain; - - var veggies = CreateModel(loop); } internal static async Task EasyModelExtractionAsync (Efl.Loop loop)