eolian: attempt to silence coverity overlapping assignment errors

While the previous code was I believe correct, coverity still
complains about it. Split it into two statements also to declare
intent.

CID 1402603..1402724
This commit is contained in:
Daniel Kolesa 2019-08-05 15:32:15 +02:00
parent ce44122f61
commit ede2db5f1b
1 changed files with 5 additions and 2 deletions

View File

@ -120,8 +120,11 @@ static Eina_Bool
promote(Eolian_Expression *a, Eolian_Expression *b)
{
#define CONVERT_CASE(id, dtp, expr, field, fnm) \
case EOLIAN_EXPR_##id: \
expr->value.field = (dtp)(expr->value.fnm); break;
case EOLIAN_EXPR_##id: { \
dtp nv = (dtp)(expr->value.fnm); \
expr->value.field = nv; \
break; \
}
#define CONVERT(dtp, expr, field) \
switch (expr->type) \