Evas filters: Fix warnings on shadowed variables
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 12 Feb 2014 01:14:38 +0000 (10:14 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 12 Feb 2014 01:36:11 +0000 (10:36 +0900)
Also, remove globals A, R, G, B from parser.c... these are
temp variables used in a macro.

My CFLAGS didn't include -Wshadow so I missed those.
Thanks Tom for spotting :)

src/lib/evas/canvas/evas_object_text.c
src/lib/evas/filters/evas_filter.c
src/lib/evas/filters/evas_filter_blend.c
src/lib/evas/filters/evas_filter_parser.c

index 89be999d4f8bc8c9223d289d69c69d43a196ebeb..e99ab4befb47107eb8d9399614da19d8c322d0b6 100644 (file)
@@ -2177,10 +2177,10 @@ evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
                {
                   Evas_Filter_Proxy_Binding *pb;
                   Evas_Object_Protected_Data *source;
-                  Eina_Iterator *it;
+                  Eina_Iterator *iter;
 
-                  it = eina_hash_iterator_data_new(o->cur.filter.sources);
-                  EINA_ITERATOR_FOREACH(it, pb)
+                  iter = eina_hash_iterator_data_new(o->cur.filter.sources);
+                  EINA_ITERATOR_FOREACH(iter, pb)
                     {
                        source = eo_data_scope_get(pb->eo_source, EVAS_OBJ_CLASS);
                        if (source->changed)
@@ -2189,7 +2189,7 @@ evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
                             break;
                          }
                     }
-                  eina_iterator_free(it);
+                  eina_iterator_free(iter);
                }
 
              if (!redraw)
index 77066f6e2aae425b402c2245368f373edb6c92bd..f2016a251c3b4d60d94b2740992805dafd87d2ba 100644 (file)
@@ -378,7 +378,7 @@ evas_filter_context_buffers_allocate_all(Evas_Filter_Context *ctx,
    EINA_INLIST_FOREACH(ctx->commands, cmd)
      {
         Evas_Filter_Fill_Mode fillmode = cmd->draw.fillmode;
-        Evas_Filter_Buffer *in, *fb, *out;
+        Evas_Filter_Buffer *in, *out;
 
         in = cmd->input;
         if (!in->w && !in->h)
@@ -424,7 +424,6 @@ evas_filter_context_buffers_allocate_all(Evas_Filter_Context *ctx,
 
         if (cmd->draw.need_temp_buffer)
           {
-             Evas_Filter_Buffer *in;
              unsigned sw = w, sh = h;
 
              in = cmd->input;
index d5536715840a271cc3063fc4b1b2ebc36c3b736b..d7585f1d44a09ee93ea1d1e9e1d9215c7021ea46 100644 (file)
@@ -152,7 +152,6 @@ _mapped_blend_cpu(void *data, void *drawctx,
 
    if (fillmode == EVAS_FILTER_FILL_MODE_NONE)
      {
-        int rows, cols;
         _clip_to_target(&sx, &sy, sw, sh, dx, dy, out->cache_entry.w,
                         out->cache_entry.h, &dx, &dy, &rows, &cols);
 
index 58021671b181046f9468e5c562c06528500b29cc..d9e3f7b20b0e7aea8bd926a614e29006b7e6bcf9 100644 (file)
@@ -1422,8 +1422,6 @@ evas_filter_program_source_set_all(Evas_Filter_Program *pgm,
    ENFN->context_clip_set(ENDT, dc, l, r, t, b); } while (0)
 #define RESETCLIP() do { ENFN->context_clip_set(ENDT, dc, _l, _r, _t, _b); } while (0)
 
-int A, R, G, B;
-
 static Evas_Filter_Fill_Mode
 _fill_mode_get(Evas_Filter_Instruction *instr)
 {
@@ -1451,7 +1449,7 @@ _instr2cmd_blend(Evas_Filter_Context *ctx, Evas_Filter_Program *pgm,
    DATA32 color;
    Buffer *in, *out;
    Evas_Filter_Fill_Mode fillmode;
-   int cmdid, ox, oy;
+   int cmdid, ox, oy, A, R, G, B;
 
    src = _instruction_param_gets(instr, "src", NULL);
    dst = _instruction_param_gets(instr, "dst", NULL);
@@ -1480,7 +1478,7 @@ _instr2cmd_blur(Evas_Filter_Context *ctx, Evas_Filter_Program *pgm,
    const char *src, *dst, *typestr;
    DATA32 color;
    Buffer *in, *out;
-   int cmdid, ox, oy, rx, ry;
+   int cmdid, ox, oy, rx, ry, A, R, G, B;
 
    src = _instruction_param_gets(instr, "src", NULL);
    dst = _instruction_param_gets(instr, "dst", NULL);
@@ -1645,8 +1643,7 @@ _instr2cmd_mask(Evas_Filter_Context *ctx, Evas_Filter_Program *pgm,
    const char *src, *dst, *msk;
    Buffer *in, *out, *mask;
    DATA32 color;
-   int R, G, B, A;
-   int cmdid;
+   int R, G, B, A, cmdid;
 
    src = _instruction_param_gets(instr, "src", NULL);
    dst = _instruction_param_gets(instr, "dst", NULL);