Ticket #3955: mc-3955-tar-cleanup-implicit-fallthrough-warning.patch

File mc-3955-tar-cleanup-implicit-fallthrough-warning.patch, 969 bytes (added by and, 5 years ago)
  • src/vfs/tar/tar.c

    From c5e1ade7ebe516317d60dc15d868336757bdf72a Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Fri, 11 Jan 2019 16:46:01 +0000
    Subject: [PATCH] tar.c: cleanup -Wimplicit-fallthrough warning
    
    Found by GCC8
    
    tar.c:786:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 switch (prev_status)
                 ^~~~~~
    tar.c:811:9: note: here
             case STATUS_EOFMARK:   /* If error after 0's */
             ^~~~
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/vfs/tar/tar.c | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/vfs/tar/tar.c b/src/vfs/tar/tar.c
    index 13852d6b7..a2237b4c5 100644
    a b tar_open_archive (struct vfs_s_super *archive, const vfs_path_t * vpath, 
    806806            default: 
    807807                break; 
    808808            } 
     809            MC_FALLTHROUGH; 
    809810 
    810811            /* Record of zeroes */ 
    811812        case STATUS_EOFMARK:   /* If error after 0's */