Ticket #3876: mc-3876-edit.c-Cleanup-implicit-fallthrough-warnings.patch

File mc-3876-edit.c-Cleanup-implicit-fallthrough-warnings.patch, 3.2 KB (added by and, 7 years ago)
  • src/editor/edit.c

    From 98015819e20457678398a1b8c88080aa305d73b1 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Thu, 4 Jan 2018 07:21:37 +0000
    Subject: [PATCH] (edit.c): Cleanup implicit-fallthrough warnings
    
    Found by GCC 7.2.0
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/editor/edit.c | 11 +++++++++++
     1 file changed, 11 insertions(+)
    
    diff --git a/src/editor/edit.c b/src/editor/edit.c
    index b584400f2..3167fc5e9 100644
    a b edit_execute_cmd (WEdit * edit, long command, int char_for_insertion) 
    34563456    case CK_MarkColumnDown: 
    34573457        if (edit->mark2 == -1) 
    34583458            break;              /*marking is following the cursor: may need to highlight a whole line */ 
     3459        MC_FALLTHROUGH; 
    34593460    case CK_Left: 
    34603461    case CK_Right: 
    34613462    case CK_MarkLeft: 
    edit_execute_cmd (WEdit * edit, long command, int char_for_insertion) 
    35513552 
    35523553    case CK_MarkColumnPageUp: 
    35533554        edit->column_highlight = 1; 
     3555        MC_FALLTHROUGH; 
    35543556    case CK_PageUp: 
    35553557    case CK_MarkPageUp: 
    35563558        edit_move_up (edit, w->lines - 1, TRUE); 
    35573559        break; 
    35583560    case CK_MarkColumnPageDown: 
    35593561        edit->column_highlight = 1; 
     3562        MC_FALLTHROUGH; 
    35603563    case CK_PageDown: 
    35613564    case CK_MarkPageDown: 
    35623565        edit_move_down (edit, w->lines - 1, TRUE); 
    35633566        break; 
    35643567    case CK_MarkColumnLeft: 
    35653568        edit->column_highlight = 1; 
     3569        MC_FALLTHROUGH; 
    35663570    case CK_Left: 
    35673571    case CK_MarkLeft: 
    35683572        if (option_fake_half_tabs && is_in_indent (&edit->buffer) && right_of_four_spaces (edit)) 
    edit_execute_cmd (WEdit * edit, long command, int char_for_insertion) 
    35783582        break; 
    35793583    case CK_MarkColumnRight: 
    35803584        edit->column_highlight = 1; 
     3585        MC_FALLTHROUGH; 
    35813586    case CK_Right: 
    35823587    case CK_MarkRight: 
    35833588        if (option_fake_half_tabs && is_in_indent (&edit->buffer) && left_of_four_spaces (edit)) 
    edit_execute_cmd (WEdit * edit, long command, int char_for_insertion) 
    36083613        break; 
    36093614    case CK_MarkColumnUp: 
    36103615        edit->column_highlight = 1; 
     3616        MC_FALLTHROUGH; 
    36113617    case CK_Up: 
    36123618    case CK_MarkUp: 
    36133619        edit_move_up (edit, 1, FALSE); 
    36143620        break; 
    36153621    case CK_MarkColumnDown: 
    36163622        edit->column_highlight = 1; 
     3623        MC_FALLTHROUGH; 
    36173624    case CK_Down: 
    36183625    case CK_MarkDown: 
    36193626        edit_move_down (edit, 1, FALSE); 
    36203627        break; 
    36213628    case CK_MarkColumnParagraphUp: 
    36223629        edit->column_highlight = 1; 
     3630        MC_FALLTHROUGH; 
    36233631    case CK_ParagraphUp: 
    36243632    case CK_MarkParagraphUp: 
    36253633        edit_move_up_paragraph (edit, FALSE); 
    36263634        break; 
    36273635    case CK_MarkColumnParagraphDown: 
    36283636        edit->column_highlight = 1; 
     3637        MC_FALLTHROUGH; 
    36293638    case CK_ParagraphDown: 
    36303639    case CK_MarkParagraphDown: 
    36313640        edit_move_down_paragraph (edit, FALSE); 
    36323641        break; 
    36333642    case CK_MarkColumnScrollUp: 
    36343643        edit->column_highlight = 1; 
     3644        MC_FALLTHROUGH; 
    36353645    case CK_ScrollUp: 
    36363646    case CK_MarkScrollUp: 
    36373647        edit_move_up (edit, 1, TRUE); 
    36383648        break; 
    36393649    case CK_MarkColumnScrollDown: 
    36403650        edit->column_highlight = 1; 
     3651        MC_FALLTHROUGH; 
    36413652    case CK_ScrollDown: 
    36423653    case CK_MarkScrollDown: 
    36433654        edit_move_down (edit, 1, TRUE);