Ticket #3547: mc-3547-cleanup-conversion-warning-chown_but.patch

File mc-3547-cleanup-conversion-warning-chown_but.patch, 1.2 KB (added by and, 8 years ago)
  • src/filemanager/chown.c

    fix -Wconversion warning at struct chown_but
    
    patch will fix these warnings:
    chown.c:136:34: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion]
    chown.c:254:14: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion]
    chown.c:259:78: warning: implicit conversion changes signedness: 'int' to 'button_flags_t' [-Wsign-conversion]
    chown.c:270:42: warning: implicit conversion changes signedness: 'int' to 'button_flags_t' [-Wsign-conversion]
    chown.c:274:42: warning: implicit conversion changes signedness: 'int' to 'button_flags_t' [-Wsign-conversion]
    
    patch against a5cd0093c5330ae6118cbf2830cf288dd4a68ed0
    compile test with gcc 4.6/4.9/5.2 and clang 3.7
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    
    a b  
    8181/* *INDENT-OFF* */ 
    8282static struct 
    8383{ 
    84     int ret_cmd, flags, y, len; 
     84    int ret_cmd, y, len; 
     85    button_flags_t flags; 
    8586    const char *text; 
    8687} chown_but[BUTTONS] = { 
    8788    { B_SETALL, NORMAL_BUTTON,  5, 0, N_("Set &all") }, 
     
    9293}; 
    9394 
    9495/* summary length of three buttons */ 
    95 static unsigned int blen = 0; 
     96static int blen = 0; 
    9697 
    9798static struct { 
    9899    int y;