Ticket #3876: mc-3876-edit.c-Cleanup-unreachable-code-return-warning.patch

File mc-3876-edit.c-Cleanup-unreachable-code-return-warning.patch, 1000 bytes (added by and, 7 years ago)
  • src/editor/edit.c

    From 9019c5f1afa801c5a5fa1d6e1b67bea7eb3131eb Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Thu, 4 Jan 2018 08:15:54 +0000
    Subject: [PATCH] (edit.c): Cleanup unreachable-code-return warning
    
    Found by Clang 4.0.1.
    
    edit.c:896:16: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
            return 0x80000000UL;
                   ^~~~~~~~~~~~
    
    (whole my_type_of() is suspect)
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/editor/edit.c | 6 +-----
     1 file changed, 1 insertion(+), 5 deletions(-)
    
    diff --git a/src/editor/edit.c b/src/editor/edit.c
    index b584400f2..6cfdd4671 100644
    a b my_type_of (int c) 
    890890    if (c == 0) 
    891891        return 0; 
    892892    if (c == '!') 
    893     { 
    894         if (*option_chars_move_whole_word == '!') 
    895             return 2; 
    896         return 0x80000000UL; 
    897     } 
     893        return 2; 
    898894    if (g_ascii_isupper ((gchar) c)) 
    899895        c = 'A'; 
    900896    else if (g_ascii_islower ((gchar) c))