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);
|
||||
|
||||
Display_cursor();
|
||||
|
||||
break;
|
||||
case 7:
|
||||
snapgrid = !snapgrid;
|
||||
Hide_cursor();
|
||||
|
||||
@ -2222,6 +2222,9 @@ void Save_IFF(T_IO_Context * context)
|
||||
break;
|
||||
case PIXEL_TALL3: // 3:4
|
||||
header.X_aspect = (header.X_aspect * 15) / 10; // *1.5
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
||||
__attribute__ ((fallthrough));
|
||||
#endif
|
||||
case PIXEL_TALL:
|
||||
case PIXEL_TALL2:
|
||||
header.Y_aspect *= 2; // 1:2
|
||||
|
||||
@ -235,6 +235,7 @@ void Window_set_shortcut(int action_id)
|
||||
case 1: // Cancel
|
||||
shortcut_ptr[0]=backup_shortcut[0];
|
||||
shortcut_ptr[1]=backup_shortcut[1];
|
||||
break;
|
||||
case 2: // OK
|
||||
// Replace twice by single
|
||||
if (shortcut_ptr[0]==shortcut_ptr[1])
|
||||
|
||||
@ -1146,6 +1146,9 @@ int Init_program(int argc,char * argv[])
|
||||
|
||||
Button_Page(BUTTON_PAGE);
|
||||
// no break ! proceed with the other file now
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
||||
__attribute__ ((fallthrough));
|
||||
#endif
|
||||
case 1:
|
||||
Init_context_layered_image(&context, 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"
|
||||
if (unit_index!=UNIT_RATIO)
|
||||
break;
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
||||
__attribute__ ((fallthrough));
|
||||
#endif
|
||||
case 10: // input new width
|
||||
case 12: // input new height
|
||||
Num2str(*( input_value[clicked_button-10]),buffer,4);
|
||||
|
||||
@ -2418,6 +2418,9 @@ void Display_cursor(void)
|
||||
case CURSOR_SHAPE_BUCKET :
|
||||
if (Cursor_hidden)
|
||||
break;
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
||||
__attribute__ ((fallthrough));
|
||||
#endif
|
||||
|
||||
case CURSOR_SHAPE_ARROW :
|
||||
case CURSOR_SHAPE_HOURGLASS :
|
||||
@ -2717,6 +2720,9 @@ void Hide_cursor(void)
|
||||
case CURSOR_SHAPE_BUCKET :
|
||||
if (Cursor_hidden)
|
||||
break;
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
||||
__attribute__ ((fallthrough));
|
||||
#endif
|
||||
|
||||
case CURSOR_SHAPE_ARROW :
|
||||
case CURSOR_SHAPE_HOURGLASS :
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user