Fix 'implicit fallthrough' warning with new GCC
GCC 7 now warns on case statements falling through without an explicit comment that falling through is OK. Insert some to make it happy. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
This commit is contained in:
@@ -345,12 +345,14 @@ get_output_work_area(struct desktop_shell *shell,
|
|||||||
case WESTON_DESKTOP_SHELL_PANEL_POSITION_TOP:
|
case WESTON_DESKTOP_SHELL_PANEL_POSITION_TOP:
|
||||||
default:
|
default:
|
||||||
area->y += panel_height;
|
area->y += panel_height;
|
||||||
|
/* fallthrough */
|
||||||
case WESTON_DESKTOP_SHELL_PANEL_POSITION_BOTTOM:
|
case WESTON_DESKTOP_SHELL_PANEL_POSITION_BOTTOM:
|
||||||
area->width = output->width;
|
area->width = output->width;
|
||||||
area->height = output->height - panel_height;
|
area->height = output->height - panel_height;
|
||||||
break;
|
break;
|
||||||
case WESTON_DESKTOP_SHELL_PANEL_POSITION_LEFT:
|
case WESTON_DESKTOP_SHELL_PANEL_POSITION_LEFT:
|
||||||
area->x += panel_width;
|
area->x += panel_width;
|
||||||
|
/* fallthrough */
|
||||||
case WESTON_DESKTOP_SHELL_PANEL_POSITION_RIGHT:
|
case WESTON_DESKTOP_SHELL_PANEL_POSITION_RIGHT:
|
||||||
area->width = output->width - panel_width;
|
area->width = output->width - panel_width;
|
||||||
area->height = output->height;
|
area->height = output->height;
|
||||||
|
|||||||
@@ -579,22 +579,31 @@ create_subsurface_tree(struct client *client, struct wl_surface **surfs,
|
|||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
SUB_LINK(10, 2);
|
SUB_LINK(10, 2);
|
||||||
|
/* fallthrough */
|
||||||
case 10:
|
case 10:
|
||||||
SUB_LINK(9, 2);
|
SUB_LINK(9, 2);
|
||||||
|
/* fallthrough */
|
||||||
case 9:
|
case 9:
|
||||||
SUB_LINK(8, 6);
|
SUB_LINK(8, 6);
|
||||||
|
/* fallthrough */
|
||||||
case 8:
|
case 8:
|
||||||
SUB_LINK(7, 6);
|
SUB_LINK(7, 6);
|
||||||
|
/* fallthrough */
|
||||||
case 7:
|
case 7:
|
||||||
SUB_LINK(6, 2);
|
SUB_LINK(6, 2);
|
||||||
|
/* fallthrough */
|
||||||
case 6:
|
case 6:
|
||||||
SUB_LINK(5, 1);
|
SUB_LINK(5, 1);
|
||||||
|
/* fallthrough */
|
||||||
case 5:
|
case 5:
|
||||||
SUB_LINK(4, 3);
|
SUB_LINK(4, 3);
|
||||||
|
/* fallthrough */
|
||||||
case 4:
|
case 4:
|
||||||
SUB_LINK(3, 1);
|
SUB_LINK(3, 1);
|
||||||
|
/* fallthrough */
|
||||||
case 3:
|
case 3:
|
||||||
SUB_LINK(2, 0);
|
SUB_LINK(2, 0);
|
||||||
|
/* fallthrough */
|
||||||
case 2:
|
case 2:
|
||||||
SUB_LINK(1, 0);
|
SUB_LINK(1, 0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user