Remove warnings with GCC 7
GCC 7 introduced a new warning in switch() statements : warning: this statement may fall through [-Wimplicit-fallthrough=]
This commit is contained in:
parent
7f52eb9711
commit
725da6307e
@ -538,7 +538,7 @@ void Button_Grid_menu(void)
|
|||||||
Window_input_content(input_dy_button,str);
|
Window_input_content(input_dy_button,str);
|
||||||
|
|
||||||
Display_cursor();
|
Display_cursor();
|
||||||
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
snapgrid = !snapgrid;
|
snapgrid = !snapgrid;
|
||||||
Hide_cursor();
|
Hide_cursor();
|
||||||
|
|||||||
@ -2222,6 +2222,9 @@ void Save_IFF(T_IO_Context * context)
|
|||||||
break;
|
break;
|
||||||
case PIXEL_TALL3: // 3:4
|
case PIXEL_TALL3: // 3:4
|
||||||
header.X_aspect = (header.X_aspect * 15) / 10; // *1.5
|
header.X_aspect = (header.X_aspect * 15) / 10; // *1.5
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
||||||
|
__attribute__ ((fallthrough));
|
||||||
|
#endif
|
||||||
case PIXEL_TALL:
|
case PIXEL_TALL:
|
||||||
case PIXEL_TALL2:
|
case PIXEL_TALL2:
|
||||||
header.Y_aspect *= 2; // 1:2
|
header.Y_aspect *= 2; // 1:2
|
||||||
|
|||||||
@ -235,6 +235,7 @@ void Window_set_shortcut(int action_id)
|
|||||||
case 1: // Cancel
|
case 1: // Cancel
|
||||||
shortcut_ptr[0]=backup_shortcut[0];
|
shortcut_ptr[0]=backup_shortcut[0];
|
||||||
shortcut_ptr[1]=backup_shortcut[1];
|
shortcut_ptr[1]=backup_shortcut[1];
|
||||||
|
break;
|
||||||
case 2: // OK
|
case 2: // OK
|
||||||
// Replace twice by single
|
// Replace twice by single
|
||||||
if (shortcut_ptr[0]==shortcut_ptr[1])
|
if (shortcut_ptr[0]==shortcut_ptr[1])
|
||||||
|
|||||||
@ -1146,6 +1146,9 @@ int Init_program(int argc,char * argv[])
|
|||||||
|
|
||||||
Button_Page(BUTTON_PAGE);
|
Button_Page(BUTTON_PAGE);
|
||||||
// no break ! proceed with the other file now
|
// no break ! proceed with the other file now
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
||||||
|
__attribute__ ((fallthrough));
|
||||||
|
#endif
|
||||||
case 1:
|
case 1:
|
||||||
Init_context_layered_image(&context, main_filename, main_directory);
|
Init_context_layered_image(&context, main_filename, main_directory);
|
||||||
if (Get_Unicode_Filename(filename_unicode, main_filename, main_directory))
|
if (Get_Unicode_Filename(filename_unicode, main_filename, main_directory))
|
||||||
|
|||||||
@ -267,6 +267,9 @@ void Button_Transform_menu(int btn)
|
|||||||
// "Old" values are not editable, unless the unit is "ratio"
|
// "Old" values are not editable, unless the unit is "ratio"
|
||||||
if (unit_index!=UNIT_RATIO)
|
if (unit_index!=UNIT_RATIO)
|
||||||
break;
|
break;
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
||||||
|
__attribute__ ((fallthrough));
|
||||||
|
#endif
|
||||||
case 10: // input new width
|
case 10: // input new width
|
||||||
case 12: // input new height
|
case 12: // input new height
|
||||||
Num2str(*( input_value[clicked_button-10]),buffer,4);
|
Num2str(*( input_value[clicked_button-10]),buffer,4);
|
||||||
|
|||||||
@ -2418,6 +2418,9 @@ void Display_cursor(void)
|
|||||||
case CURSOR_SHAPE_BUCKET :
|
case CURSOR_SHAPE_BUCKET :
|
||||||
if (Cursor_hidden)
|
if (Cursor_hidden)
|
||||||
break;
|
break;
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
||||||
|
__attribute__ ((fallthrough));
|
||||||
|
#endif
|
||||||
|
|
||||||
case CURSOR_SHAPE_ARROW :
|
case CURSOR_SHAPE_ARROW :
|
||||||
case CURSOR_SHAPE_HOURGLASS :
|
case CURSOR_SHAPE_HOURGLASS :
|
||||||
@ -2717,6 +2720,9 @@ void Hide_cursor(void)
|
|||||||
case CURSOR_SHAPE_BUCKET :
|
case CURSOR_SHAPE_BUCKET :
|
||||||
if (Cursor_hidden)
|
if (Cursor_hidden)
|
||||||
break;
|
break;
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
||||||
|
__attribute__ ((fallthrough));
|
||||||
|
#endif
|
||||||
|
|
||||||
case CURSOR_SHAPE_ARROW :
|
case CURSOR_SHAPE_ARROW :
|
||||||
case CURSOR_SHAPE_HOURGLASS :
|
case CURSOR_SHAPE_HOURGLASS :
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user