forked from enlightenment/efl
Eobj: Fix clang's (static analyser) warnings.
SVN revision: 70537
This commit is contained in:
parent
4f29fc88b1
commit
c3cccdc7ce
|
@ -188,16 +188,13 @@ dich_func_set(Eobj_Class *klass, Eobj_Op op, eobj_op_func_type func)
|
||||||
Dich_Chain1 *chain1 = &klass->chain[DICH_CHAIN1(op)];
|
Dich_Chain1 *chain1 = &klass->chain[DICH_CHAIN1(op)];
|
||||||
if (!chain1->chain)
|
if (!chain1->chain)
|
||||||
{
|
{
|
||||||
klass->chain[DICH_CHAIN1(op)].chain =
|
chain1->chain = calloc(DICH_CHAIN2_SIZE, sizeof(*(chain1->chain)));
|
||||||
chain1->chain =
|
|
||||||
calloc(DICH_CHAIN2_SIZE, sizeof(*(chain1->chain)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Dich_Chain2 *chain2 = &chain1->chain[DICH_CHAIN2(op)];
|
Dich_Chain2 *chain2 = &chain1->chain[DICH_CHAIN2(op)];
|
||||||
if (!chain2->funcs)
|
if (!chain2->funcs)
|
||||||
{
|
{
|
||||||
chain2->funcs = chain1->chain[DICH_CHAIN2(op)].funcs =
|
chain2->funcs = calloc(num_ops, sizeof(*(chain2->funcs)));
|
||||||
calloc(num_ops, sizeof(*(chain2->funcs)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
chain2->funcs[DICH_CHAIN_LAST(op)].func = func;
|
chain2->funcs[DICH_CHAIN_LAST(op)].func = func;
|
||||||
|
@ -652,7 +649,7 @@ eobj_class_free(Eobj_Class *klass)
|
||||||
|
|
||||||
{
|
{
|
||||||
Eina_Inlist *itrn;
|
Eina_Inlist *itrn;
|
||||||
Eobj_Extension_Node *extn;
|
Eobj_Extension_Node *extn = NULL;
|
||||||
EINA_INLIST_FOREACH_SAFE(klass->extensions, itrn, extn)
|
EINA_INLIST_FOREACH_SAFE(klass->extensions, itrn, extn)
|
||||||
{
|
{
|
||||||
free(extn);
|
free(extn);
|
||||||
|
@ -1043,7 +1040,7 @@ _eobj_del_internal(Eobj *obj)
|
||||||
while (obj->kls_itr)
|
while (obj->kls_itr)
|
||||||
{
|
{
|
||||||
WRN("Kls_Itr is not empty, possibly a bug, please report. - An error will be reported for each kls_itr in the stack.");
|
WRN("Kls_Itr is not empty, possibly a bug, please report. - An error will be reported for each kls_itr in the stack.");
|
||||||
Eina_Inlist *nitr = nitr->next;
|
Eina_Inlist *nitr = obj->kls_itr->next;
|
||||||
free(EINA_INLIST_CONTAINER_GET(obj->kls_itr, Eobj_Kls_Itr_Node));
|
free(EINA_INLIST_CONTAINER_GET(obj->kls_itr, Eobj_Kls_Itr_Node));
|
||||||
obj->kls_itr = nitr;
|
obj->kls_itr = nitr;
|
||||||
}
|
}
|
||||||
|
@ -1076,7 +1073,7 @@ eobj_unref(Eobj *obj)
|
||||||
while (obj->xrefs)
|
while (obj->xrefs)
|
||||||
{
|
{
|
||||||
WRN("obj->xrefs is not empty, possibly a bug, please report. - An error will be reported for each xref in the stack.");
|
WRN("obj->xrefs is not empty, possibly a bug, please report. - An error will be reported for each xref in the stack.");
|
||||||
Eina_Inlist *nitr = nitr->next;
|
Eina_Inlist *nitr = obj->xrefs->next;
|
||||||
free(EINA_INLIST_CONTAINER_GET(obj->xrefs, Eobj_Kls_Itr_Node));
|
free(EINA_INLIST_CONTAINER_GET(obj->xrefs, Eobj_Kls_Itr_Node));
|
||||||
obj->xrefs = nitr;
|
obj->xrefs = nitr;
|
||||||
}
|
}
|
||||||
|
@ -1350,7 +1347,7 @@ static void
|
||||||
_eobj_callback_remove_all(Eobj *obj)
|
_eobj_callback_remove_all(Eobj *obj)
|
||||||
{
|
{
|
||||||
Eina_Inlist *initr;
|
Eina_Inlist *initr;
|
||||||
Eobj_Callback_Description *cb;
|
Eobj_Callback_Description *cb = NULL;
|
||||||
EINA_INLIST_FOREACH_SAFE(obj->callbacks, initr, cb)
|
EINA_INLIST_FOREACH_SAFE(obj->callbacks, initr, cb)
|
||||||
{
|
{
|
||||||
_eobj_callback_remove(obj, cb);
|
_eobj_callback_remove(obj, cb);
|
||||||
|
@ -1361,7 +1358,7 @@ static void
|
||||||
_eobj_callbacks_clear(Eobj *obj)
|
_eobj_callbacks_clear(Eobj *obj)
|
||||||
{
|
{
|
||||||
Eina_Inlist *itn;
|
Eina_Inlist *itn;
|
||||||
Eobj_Callback_Description *cb;
|
Eobj_Callback_Description *cb = NULL;
|
||||||
|
|
||||||
/* Abort if we are currently walking the list. */
|
/* Abort if we are currently walking the list. */
|
||||||
if (obj->walking_list > 0)
|
if (obj->walking_list > 0)
|
||||||
|
|
|
@ -33,7 +33,7 @@ static void
|
||||||
_eobj_generic_data_del_all(Private_Data *pd)
|
_eobj_generic_data_del_all(Private_Data *pd)
|
||||||
{
|
{
|
||||||
Eina_Inlist *nnode;
|
Eina_Inlist *nnode;
|
||||||
Eobj_Generic_Data_Node *node;
|
Eobj_Generic_Data_Node *node = NULL;
|
||||||
|
|
||||||
EINA_INLIST_FOREACH_SAFE(pd->generic_data, nnode, node)
|
EINA_INLIST_FOREACH_SAFE(pd->generic_data, nnode, node)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue