efl: fix misleading indentation
authorJean Guyomarc'h <jean@guyomarch.bzh>
Wed, 18 May 2016 19:27:58 +0000 (21:27 +0200)
committerJean Guyomarc'h <jean@guyomarch.bzh>
Wed, 18 May 2016 19:57:02 +0000 (21:57 +0200)
GCC's -Wmisleading-indentation is complaining...
It is a warning flag introduced in GCC 6.x, and
is enabled by -Wall.

src/lib/eina/eina_benchmark.c
src/lib/eina/eina_magic.c
src/lib/evas/canvas/evas_callbacks.c
src/lib/evas/canvas/evas_object_main.c
src/lib/evas/canvas/evas_object_textgrid.c
src/lib/evas/canvas/evas_vg_node.c
src/lib/evas/common/evas_convert_color.c
src/modules/evas/engines/gl_common/evas_gl_preload.c
src/static_libs/rg_etc/rg_etc1.c
src/tests/eina/eina_test_stringshare.c

index 0159ddc..6583e75 100644 (file)
@@ -327,14 +327,14 @@ eina_benchmark_run(Eina_Benchmark *bench)
       else
          fprintf(main_script, ", \\\n");
 
-         fprintf(main_script,
+      fprintf(main_script,
               "\"%s\" using 1:2 title \'%s\' with line",
               buffer, run->name);
    }
 
-         fprintf(main_script, "\n");
+   fprintf(main_script, "\n");
 
-         fclose(main_script);
+   fclose(main_script);
 
    bench->names = eina_list_append(bench->names, ea);
 
index f228dbd..6b26da6 100644 (file)
@@ -172,7 +172,7 @@ eina_magic_string_shutdown(void)
       if (ems->string_allocated)
          free((char *)ems->string);
 
-         free(_eina_magic_strings);
+   free(_eina_magic_strings);
    _eina_magic_strings = NULL;
    _eina_magic_strings_count = 0;
    _eina_magic_strings_allocated = 0;
index 8764319..1081cce 100644 (file)
@@ -200,55 +200,52 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
 
    _evas_walk(e);
 
-   if (type == EVAS_CALLBACK_MOVE &&
-       obj->move_ref == 0)
+   if ((type == EVAS_CALLBACK_MOVE) && (obj->move_ref == 0))
      goto nothing_here;
 
+   switch (type)
      {
-        switch (type)
-          {
-           case EVAS_CALLBACK_MOUSE_DOWN:
+      case EVAS_CALLBACK_MOUSE_DOWN:
+           {
+              Evas_Event_Mouse_Down *ev = event_info;
+
+              flags = ev->flags;
+              if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK))
                 {
-                   Evas_Event_Mouse_Down *ev = event_info;
-
-                   flags = ev->flags;
-                   if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK))
-                     {
-                        if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1))
-                          ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
-                     }
-                   obj->last_mouse_down_counter = e->last_mouse_down_counter;
-                   break;
+                   if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1))
+                     ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
                 }
-           case EVAS_CALLBACK_MOUSE_UP:
+              obj->last_mouse_down_counter = e->last_mouse_down_counter;
+              break;
+           }
+      case EVAS_CALLBACK_MOUSE_UP:
+           {
+              Evas_Event_Mouse_Up *ev = event_info;
+
+              flags = ev->flags;
+              if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK))
                 {
-                   Evas_Event_Mouse_Up *ev = event_info;
-
-                   flags = ev->flags;
-                   if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK))
-                     {
-                        if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1))
-                          ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
-                     }
-                   obj->last_mouse_up_counter = e->last_mouse_up_counter;
-                   break;
+                   if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1))
+                     ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
                 }
-           default:
+              obj->last_mouse_up_counter = e->last_mouse_up_counter;
               break;
-          }
+           }
+      default:
+         break;
+     }
 
-        eo_event_callback_call(eo_obj, _legacy_evas_callback_table[type], event_info);
+   eo_event_callback_call(eo_obj, _legacy_evas_callback_table[type], event_info);
 
-        if (type == EVAS_CALLBACK_MOUSE_DOWN)
-          {
-             Evas_Event_Mouse_Down *ev = event_info;
-             ev->flags = flags;
-          }
-        else if (type == EVAS_CALLBACK_MOUSE_UP)
-          {
-             Evas_Event_Mouse_Up *ev = event_info;
-             ev->flags = flags;
-          }
+   if (type == EVAS_CALLBACK_MOUSE_DOWN)
+     {
+        Evas_Event_Mouse_Down *ev = event_info;
+        ev->flags = flags;
+     }
+   else if (type == EVAS_CALLBACK_MOUSE_UP)
+     {
+        Evas_Event_Mouse_Up *ev = event_info;
+        ev->flags = flags;
      }
 
  nothing_here:
index 5d8ba2a..661a16c 100644 (file)
@@ -949,7 +949,8 @@ _evas_object_efl_gfx_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
 
    if (obj->delete_me) return;
    if (!obj->layer) return;
-   if (w < 0) w = 0; if (h < 0) h = 0;
+   if (w < 0) w = 0;
+   if (h < 0) h = 0;
 
    evas_object_async_block(obj);
    if (evas_object_intercept_call_resize(eo_obj, obj, w, h)) return;
@@ -1022,7 +1023,10 @@ EAPI void
 evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 {
    MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
-   if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
+   if (x) *x = 0;
+   if (y) *y = 0;
+   if (w) *w = 0;
+   if (h) *h = 0;
    return;
    MAGIC_CHECK_END();
    efl_gfx_position_get((Eo *)eo_obj, x, y);
@@ -1036,7 +1040,8 @@ _evas_object_efl_gfx_position_get(Eo *obj EINA_UNUSED,
 {
    if ((pd->delete_me) || (!pd->layer))
      {
-        if (x) *x = 0; if (y) *y = 0;
+        if (x) *x = 0;
+        if (y) *y = 0;
         return;
      }
 
@@ -1051,7 +1056,8 @@ _evas_object_efl_gfx_size_get(Eo *obj EINA_UNUSED,
 {
    if (pd->delete_me)
      {
-        if (w) *w = 0; if (h) *h = 0;
+        if (w) *w = 0;
+        if (h) *h = 0;
         return;
      }
 
@@ -1102,7 +1108,8 @@ _evas_object_size_hint_min_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Dat
 {
    if ((!obj->size_hints) || obj->delete_me)
      {
-        if (w) *w = 0; if (h) *h = 0;
+        if (w) *w = 0;
+        if (h) *h = 0;
         return;
      }
    if (w) *w = obj->size_hints->min.w;
@@ -1128,7 +1135,8 @@ _evas_object_size_hint_max_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Dat
 {
    if ((!obj->size_hints) || obj->delete_me)
      {
-        if (w) *w = -1; if (h) *h = -1;
+        if (w) *w = -1;
+        if (h) *h = -1;
         return;
      }
    if (w) *w = obj->size_hints->max.w;
@@ -1154,7 +1162,8 @@ _evas_object_size_hint_request_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected
 {
    if ((!obj->size_hints) || obj->delete_me)
      {
-        if (w) *w = 0; if (h) *h = 0;
+        if (w) *w = 0;
+        if (h) *h = 0;
         return;
      }
    if (w) *w = obj->size_hints->request.w;
@@ -1181,7 +1190,8 @@ _evas_object_size_hint_aspect_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_
    if ((!obj->size_hints) || obj->delete_me)
      {
         if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE;
-        if (w) *w = 0; if (h) *h = 0;
+        if (w) *w = 0;
+        if (h) *h = 0;
         return;
      }
    if (aspect) *aspect = obj->size_hints->aspect.mode;
@@ -1209,7 +1219,8 @@ _evas_object_size_hint_align_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_D
 {
    if ((!obj->size_hints) || obj->delete_me)
      {
-        if (x) *x = 0.5; if (y) *y = 0.5;
+        if (x) *x = 0.5;
+        if (y) *y = 0.5;
         return;
      }
    if (x) *x = obj->size_hints->align.x;
@@ -1235,7 +1246,8 @@ _evas_object_size_hint_weight_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_
 {
    if ((!obj->size_hints) || obj->delete_me)
      {
-        if (x) *x = 0.0; if (y) *y = 0.0;
+        if (x) *x = 0.0;
+        if (y) *y = 0.0;
         return;
      }
    if (x) *x = obj->size_hints->weight.x;
@@ -1261,8 +1273,10 @@ _evas_object_size_hint_padding_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected
 {
    if ((!obj->size_hints) || obj->delete_me)
      {
-        if (l) *l = 0; if (r) *r = 0;
-        if (t) *t = 0; if (b) *b = 0;
+        if (l) *l = 0;
+        if (r) *r = 0;
+        if (t) *t = 0;
+        if (b) *b = 0;
         return;
      }
    if (l) *l = obj->size_hints->padding.l;
@@ -1506,10 +1520,14 @@ _evas_object_efl_gfx_color_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
                                     int r, int g, int b, int a)
 {
    if (obj->delete_me) return;
-   if (r > 255) r = 255; if (r < 0) r = 0;
-   if (g > 255) g = 255; if (g < 0) g = 0;
-   if (b > 255) b = 255; if (b < 0) b = 0;
-   if (a > 255) a = 255; if (a < 0) a = 0;
+   if (r > 255) r = 255;
+   if (r < 0) r = 0;
+   if (g > 255) g = 255;
+   if (g < 0) g = 0;
+   if (b > 255) b = 255;
+   if (b < 0) b = 0;
+   if (a > 255) a = 255;
+   if (a < 0) a = 0;
    if (r > a)
      {
         r = a;
@@ -1582,7 +1600,10 @@ _evas_object_efl_gfx_color_get(Eo *eo_obj EINA_UNUSED,
 {
    if (obj->delete_me)
      {
-        if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0;
+        if (r) *r = 0;
+        if (g) *g = 0;
+        if (b) *b = 0;
+        if (a) *a = 0;
         return;
      }
    if (r) *r = obj->cur->color.r;
index 778bb96..bb7aea6 100644 (file)
@@ -1266,10 +1266,14 @@ _evas_textgrid_palette_set(Eo *eo_obj, Evas_Textgrid_Data *o, Evas_Textgrid_Pale
 
    if ((idx < 0) || (idx > 255)) return;
 
-   if (a > 255) a = 255; if (a < 0) a = 0;
-   if (r > 255) r = 255; if (r < 0) r = 0;
-   if (g > 255) g = 255; if (g < 0) g = 0;
-   if (b > 255) b = 255; if (b < 0) b = 0;
+   if (a > 255) a = 255;
+   if (a < 0) a = 0;
+   if (r > 255) r = 255;
+   if (r < 0) r = 0;
+   if (g > 255) g = 255;
+   if (g < 0) g = 0;
+   if (b > 255) b = 255;
+   if (b < 0) b = 0;
    if (r > a)
      {
         r = a;
index edc5f51..7a55b20 100644 (file)
@@ -128,10 +128,14 @@ _efl_vg_efl_gfx_color_set(Eo *obj EINA_UNUSED,
                                     Efl_VG_Data *pd,
                                     int r, int g, int b, int a)
 {
-   if (r > 255) r = 255; if (r < 0) r = 0;
-   if (g > 255) g = 255; if (g < 0) g = 0;
-   if (b > 255) b = 255; if (b < 0) b = 0;
-   if (a > 255) a = 255; if (a < 0) a = 0;
+   if (r > 255) r = 255;
+   if (r < 0) r = 0;
+   if (g > 255) g = 255;
+   if (g < 0) g = 0;
+   if (b > 255) b = 255;
+   if (b < 0) b = 0;
+   if (a > 255) a = 255;
+   if (a < 0) a = 0;
    if (r > a)
      {
         r = a;
index 7cdd3f6..87057e4 100644 (file)
@@ -157,22 +157,34 @@ evas_common_convert_color_hsv_to_rgb(float h, float s, float v, int *r, int *g,
    switch (i)
      {
        case 1:
-         if (r) *r = v - f;  if (g) *g = v;  if (b) *b = s;
+         if (r) *r = v - f;
+         if (g) *g = v;
+         if (b) *b = s;
          return;
        case 2:
-         if (r) *r = s;  if (g) *g = v;  if (b) *b = s + f;
+         if (r) *r = s;
+         if (g) *g = v;
+         if (b) *b = s + f;
          return;
        case 3:
-         if (r) *r = s;  if (g) *g = v - f;  if (b) *b = v;
+         if (r) *r = s;
+         if (g) *g = v - f;
+         if (b) *b = v;
          return;
        case 4:
-         if (r) *r = s + f;  if (g) *g = s;  if (b) *b = v;
+         if (r) *r = s + f;
+         if (g) *g = s;
+         if (b) *b = v;
          return;
        case 5:
-         if (r) *r = v;  if (g) *g = s;  if (b) *b = v - f;
+         if (r) *r = v;
+         if (g) *g = s;
+         if (b) *b = v - f;
          return;
        default:
-         if (r) *r = v;  if (g) *g = s + f;  if (b) *b = s;
+         if (r) *r = v;
+         if (g) *g = s + f;
+         if (b) *b = s;
          break;
      }
 }
index 927ba95..35e6879 100644 (file)
@@ -73,14 +73,14 @@ evas_gl_preload_pop(Evas_GL_Texture *tex)
      if (async->tex == tex)
        {
           async_loader_tex = eina_list_remove_list(async_loader_tex, l);
-          
+
           evas_gl_common_texture_free(async->tex, EINA_FALSE);
 #ifdef EVAS_CSERVE2
-        if (evas_cache2_image_cached(&async->im->cache_entry))
-          evas_cache2_image_close(&async->im->cache_entry);
-        else
+          if (evas_cache2_image_cached(&async->im->cache_entry))
+            evas_cache2_image_close(&async->im->cache_entry);
+          else
 #endif
-          evas_cache_image_drop(&async->im->cache_entry);
+            evas_cache_image_drop(&async->im->cache_entry);
           free(async);
 
           break;
index cff0094..e17eb88 100644 (file)
@@ -2797,9 +2797,12 @@ rg_etc1_pack_block(void* pETC1_block, const unsigned int* pSrc_pixels_BGRA, rg_e
      }
    else
      {
-        if (dr < 0) dr += 8; dst_block[0] = (uint8)((best_results[0].m_block_color_unscaled.comp.r << 3) | dr);
-        if (dg < 0) dg += 8; dst_block[1] = (uint8)((best_results[0].m_block_color_unscaled.comp.g << 3) | dg);
-        if (db < 0) db += 8; dst_block[2] = (uint8)((best_results[0].m_block_color_unscaled.comp.b << 3) | db);
+        if (dr < 0) dr += 8;
+        dst_block[0] = (uint8)((best_results[0].m_block_color_unscaled.comp.r << 3) | dr);
+        if (dg < 0) dg += 8;
+        dst_block[1] = (uint8)((best_results[0].m_block_color_unscaled.comp.g << 3) | dg);
+        if (db < 0) db += 8;
+        dst_block[2] = (uint8)((best_results[0].m_block_color_unscaled.comp.b << 3) | db);
      }
 
    dst_block[3] = (uint8)((best_results[1].m_block_inten_table << 2) |
index ec53911..cfc063b 100644 (file)
@@ -187,7 +187,7 @@ START_TEST(eina_stringshare_collision)
    for (i = 0; i < 1000; ++i)
       eina_stringshare_del(eina_array_pop(ea));
 
-      eina_shutdown();
+   eina_shutdown();
 
    eina_array_free(ea);
 }