From 4e8dc270f973bec08ff99c5f7f26707e48c550da Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Wed, 29 May 2019 15:13:32 +0200 Subject: [PATCH] Efl.Ui.Flip: Silence warning The Efl.Ui.Orientation enum is actually made of flags, which we can OR together, and it includes bitmasks for easier manipulation. gcc expects switch() statemenets to include all enum values and nothing but the valid enum values, which is abit too restrictive for flags. Casting to int removes the warning. --- src/lib/elementary/efl_ui_flip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_flip.c b/src/lib/elementary/efl_ui_flip.c index 71dc20e076..3c1379585c 100644 --- a/src/lib/elementary/efl_ui_flip.c +++ b/src/lib/elementary/efl_ui_flip.c @@ -2044,7 +2044,7 @@ _flip_dir_to_efl_ui_dir(Elm_Flip_Direction dir) static Elm_Flip_Direction _efl_ui_dir_to_flip_dir(Efl_Ui_Dir dir) { - switch (dir) + switch ((int)dir) // The cast silences warnings about missing enum values and non-existing case labels { case EFL_UI_DIR_RIGHT: case EFL_UI_DIR_HORIZONTAL: