get rid of shadow variables
Summary: gl: add some EINA_FALLTHROUGH Reviewers: #reviewers, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9525
This commit is contained in:
parent
9b7d71df79
commit
cdb920ab08
|
@ -18,14 +18,14 @@ typedef enum {
|
|||
static void
|
||||
_btn_color_clicked_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
Eo *layout = data;
|
||||
Eo *l = data;
|
||||
|
||||
static Eina_Bool changed = EINA_TRUE;
|
||||
|
||||
if (changed)
|
||||
efl_gfx_color_set(layout, 0, 88, 204, 255);
|
||||
efl_gfx_color_set(l, 0, 88, 204, 255);
|
||||
else
|
||||
efl_gfx_color_set(layout, 255, 255, 255, 255);
|
||||
efl_gfx_color_set(l, 255, 255, 255, 255);
|
||||
|
||||
changed = !changed;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ _sync(Efl_Core_Env *obj, Efl_Core_Proc_Env_Data *pd)
|
|||
Eina_List *existing_keys = NULL, *n;
|
||||
Eina_Iterator *content;
|
||||
const char *key;
|
||||
char **env = NULL;
|
||||
char **loc_env = NULL;
|
||||
|
||||
pd->in_sync = EINA_TRUE;
|
||||
content = efl_core_env_content_get(obj);
|
||||
|
@ -44,16 +44,16 @@ _sync(Efl_Core_Env *obj, Efl_Core_Proc_Env_Data *pd)
|
|||
|
||||
#if defined (__FreeBSD__) || defined (__OpenBSD__)
|
||||
_dl_environ = dlsym(NULL, "environ");
|
||||
if (_dl_environ) env = *_dl_environ;
|
||||
if (_dl_environ) loc_env = *_dl_environ;
|
||||
else ERR("Can't find envrion symbol");
|
||||
#else
|
||||
env = environ;
|
||||
loc_env = environ;
|
||||
#endif
|
||||
if (env)
|
||||
if (loc_env)
|
||||
{
|
||||
char **p;
|
||||
|
||||
for (p = env; *p; p++)
|
||||
for (p = loc_env; *p; p++)
|
||||
{
|
||||
char **values;
|
||||
|
||||
|
|
|
@ -120,25 +120,25 @@ _cb_thread_ctrl_out(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
Eina_Free_Cb free_func = cmd.d.ptr[2];
|
||||
if (func)
|
||||
{
|
||||
Efl_Event event = { obj, NULL, NULL };
|
||||
Efl_Event ev = { obj, NULL, NULL };
|
||||
|
||||
func(data, &event);
|
||||
func(data, &ev);
|
||||
}
|
||||
if (free_func) free_func(data);
|
||||
}
|
||||
else if (cmd.d.command == CMD_CALL_SYNC)
|
||||
{
|
||||
EflThreadIOCallSync func = cmd.d.ptr[0];
|
||||
void *data = cmd.d.ptr[1];
|
||||
void *d = cmd.d.ptr[1];
|
||||
Eina_Free_Cb free_func = cmd.d.ptr[2];
|
||||
Control_Reply *rep = cmd.d.ptr[3];
|
||||
if (func)
|
||||
{
|
||||
Efl_Event event = { obj, NULL, NULL };
|
||||
Efl_Event ev = { obj, NULL, NULL };
|
||||
|
||||
rep->data = func(data, &event);
|
||||
rep->data = func(d, &ev);
|
||||
}
|
||||
if (free_func) free_func(data);
|
||||
if (free_func) free_func(d);
|
||||
eina_semaphore_release(&(rep->sem), 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -264,10 +264,10 @@ _efl_ui_format_formatted_value_get(Eo *obj EINA_UNUSED, Efl_Ui_Format_Data *pd,
|
|||
if (pd->format_values)
|
||||
{
|
||||
/* Search in the format_values array if we have one */
|
||||
Efl_Ui_Format_Value v = { 0 };
|
||||
Efl_Ui_Format_Value val = { 0 };
|
||||
int ndx;
|
||||
eina_value_int_convert(&value, &v.value);
|
||||
ndx = eina_inarray_search_sorted(pd->format_values, &v, (Eina_Compare_Cb)_value_compare);
|
||||
eina_value_int_convert(&value, &val.value);
|
||||
ndx = eina_inarray_search_sorted(pd->format_values, &val, (Eina_Compare_Cb)_value_compare);
|
||||
if (ndx > -1) {
|
||||
Efl_Ui_Format_Value *entry = eina_inarray_nth(pd->format_values, ndx);
|
||||
eina_strbuf_append(str, entry->text);
|
||||
|
|
|
@ -3632,13 +3632,13 @@ static const Efl_Object_Property_Reflection*
|
|||
_efl_class_reflection_find(const _Efl_Class *klass, const char *property_name)
|
||||
{
|
||||
const _Efl_Class **klass_iter = klass->extensions;
|
||||
const Efl_Object_Property_Reflection_Ops *ref = klass->reflection;
|
||||
const Efl_Object_Property_Reflection_Ops *ref_ops = klass->reflection;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; ref && i < ref->count; ++i)
|
||||
for (i = 0; ref_ops && i < ref_ops->count; ++i)
|
||||
{
|
||||
if (eina_streq(property_name, ref->table[i].property_name))
|
||||
return &ref->table[i];
|
||||
if (eina_streq(property_name, ref_ops->table[i].property_name))
|
||||
return &ref_ops->table[i];
|
||||
}
|
||||
|
||||
if (klass->parent)
|
||||
|
|
|
@ -2831,6 +2831,7 @@ _normal_gles3_api_get(Evas_GL_API *funcs, int minor_version)
|
|||
ORD(glTexBuffer);
|
||||
ORD(glTexBufferRange);
|
||||
ORD(glTexStorage3DMultisample);
|
||||
EINA_FALLTHROUGH;
|
||||
case 1:
|
||||
ORD(glDispatchCompute);
|
||||
ORD(glDispatchComputeIndirect);
|
||||
|
@ -2900,6 +2901,7 @@ _normal_gles3_api_get(Evas_GL_API *funcs, int minor_version)
|
|||
ORD(glVertexAttribIFormat);
|
||||
ORD(glVertexAttribBinding);
|
||||
ORD(glVertexBindingDivisor);
|
||||
EINA_FALLTHROUGH;
|
||||
case 0:
|
||||
ORD(glBeginQuery);
|
||||
ORD(glBeginTransformFeedback);
|
||||
|
@ -3209,6 +3211,7 @@ _debug_gles3_api_get(Evas_GL_API *funcs, int minor_version)
|
|||
ORD(glTexBuffer);
|
||||
ORD(glTexBufferRange);
|
||||
ORD(glTexStorage3DMultisample);
|
||||
EINA_FALLTHROUGH;
|
||||
case 1:
|
||||
ORD(glDispatchCompute);
|
||||
ORD(glDispatchComputeIndirect);
|
||||
|
@ -3278,6 +3281,7 @@ _debug_gles3_api_get(Evas_GL_API *funcs, int minor_version)
|
|||
ORD(glVertexAttribIFormat);
|
||||
ORD(glVertexAttribBinding);
|
||||
ORD(glVertexBindingDivisor);
|
||||
EINA_FALLTHROUGH;
|
||||
case 0:
|
||||
ORD(glBeginQuery);
|
||||
ORD(glBeginTransformFeedback);
|
||||
|
@ -3455,6 +3459,7 @@ _evgl_load_gles3_apis(void *dl_handle, Evas_GL_API *funcs, int minor_version,
|
|||
ORD(glTexBuffer);
|
||||
ORD(glTexBufferRange);
|
||||
ORD(glTexStorage3DMultisample);
|
||||
EINA_FALLTHROUGH;
|
||||
case 1:
|
||||
ORD(glDispatchCompute);
|
||||
ORD(glDispatchComputeIndirect);
|
||||
|
@ -3524,6 +3529,7 @@ _evgl_load_gles3_apis(void *dl_handle, Evas_GL_API *funcs, int minor_version,
|
|||
ORD(glVertexAttribIFormat);
|
||||
ORD(glVertexAttribBinding);
|
||||
ORD(glVertexBindingDivisor);
|
||||
EINA_FALLTHROUGH;
|
||||
case 0:
|
||||
ORD(glBeginQuery);
|
||||
ORD(glBeginTransformFeedback);
|
||||
|
|
|
@ -804,15 +804,15 @@ evas_image_load_file_data_png(void *loader_data,
|
|||
//general case: 4 bytes pixel.
|
||||
if (pack_offset == sizeof(DATA32))
|
||||
{
|
||||
DATA32 *dst_ptr = (DATA32 *) surface;
|
||||
DATA32 *dst_ptr2 = (DATA32 *) surface;
|
||||
DATA32 *src_ptr2 = (DATA32 *) src_ptr;
|
||||
|
||||
for (i = 0; i < h; i++)
|
||||
{
|
||||
for (j = 0; j < w; j++)
|
||||
{
|
||||
*dst_ptr = *src_ptr2;
|
||||
++dst_ptr;
|
||||
*dst_ptr2 = *src_ptr2;
|
||||
++dst_ptr2;
|
||||
src_ptr2 += scale_ratio;
|
||||
}
|
||||
src_ptr2 += scale_ratio * image_w;
|
||||
|
@ -820,15 +820,15 @@ evas_image_load_file_data_png(void *loader_data,
|
|||
}
|
||||
else
|
||||
{
|
||||
unsigned char *dst_ptr = surface;
|
||||
unsigned char *dst_ptr2 = surface;
|
||||
|
||||
for (i = 0; i < h; i++)
|
||||
{
|
||||
for (j = 0; j < w; j++)
|
||||
{
|
||||
for (k = 0; k < (int)pack_offset; k++)
|
||||
dst_ptr[k] = src_ptr[k + scale_ratio * j * pack_offset];
|
||||
dst_ptr += pack_offset;
|
||||
dst_ptr2[k] = src_ptr[k + scale_ratio * j * pack_offset];
|
||||
dst_ptr2 += pack_offset;
|
||||
}
|
||||
src_ptr += scale_ratio * image_w * pack_offset;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue