Ticket #3426: mc-fix-wmaybe-uninitialized-warning.patch

File mc-fix-wmaybe-uninitialized-warning.patch, 1.2 KB (added by and, 9 years ago)
  • m4.include/mc-cflags.m4

    fix -Wmaybe-uninitialized compiler warnings
    and use compiler option for future compiles
    
    since gcc 4.7
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    
    a b  
    5252    MC_CHECK_ONE_CFLAG([-Wformat-security]) 
    5353    MC_CHECK_ONE_CFLAG([-Wimplicit]) 
    5454    MC_CHECK_ONE_CFLAG([-Wignored-qualifiers]) 
     55    MC_CHECK_ONE_CFLAG([-Wmaybe-uninitialized]) 
    5556    MC_CHECK_ONE_CFLAG([-Wmissing-braces]) 
    5657    MC_CHECK_ONE_CFLAG([-Wmissing-declarations]) 
    5758    MC_CHECK_ONE_CFLAG([-Wmissing-parameter-type]) 
  • src/diffviewer/ydiff.c

    a b  
    26162616#ifdef HAVE_CHARSET 
    26172617                        if (dview->utf8) 
    26182618                        { 
    2619                             int ch_len; 
     2619                            int ch_len = 0; 
    26202620 
    26212621                            next_ch = dview_get_utf (buf + cnt, &ch_len, &ch_res); 
    26222622                            if (ch_len > 1) 
     
    26932693#ifdef HAVE_CHARSET 
    26942694            if (dview->utf8) 
    26952695            { 
    2696                 int ch_len; 
     2696                int ch_len = 0; 
    26972697 
    26982698                next_ch = dview_get_utf (buf + cnt, &ch_len, &ch_res); 
    26992699                if (ch_len > 1)