Ticket #3427: mc-fix-wmissing-field-initializers-warning.patch

File mc-fix-wmissing-field-initializers-warning.patch, 1.7 KB (added by and, 9 years ago)
  • m4.include/mc-cflags.m4

    fix -Wmissing-field-initializers compiler warnings
    and use compiler option for future compile checks
    
    Please double check default field values
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    
    a b  
    5555    MC_CHECK_ONE_CFLAG([-Wmaybe-uninitialized]) 
    5656    MC_CHECK_ONE_CFLAG([-Wmissing-braces]) 
    5757    MC_CHECK_ONE_CFLAG([-Wmissing-declarations]) 
     58    MC_CHECK_ONE_CFLAG([-Wmissing-field-initializers]) 
    5859    MC_CHECK_ONE_CFLAG([-Wmissing-parameter-type]) 
    5960    MC_CHECK_ONE_CFLAG([-Wmissing-prototypes]) 
    6061    MC_CHECK_ONE_CFLAG([-Wnested-externs]) 
  • src/filemanager/file.c

    a b  
    599599progress_update_one (file_op_total_context_t * tctx, file_op_context_t * ctx, off_t add) 
    600600{ 
    601601    struct timeval tv_current; 
    602     static struct timeval tv_start = { }; 
     602    static struct timeval tv_start = { 0 }; 
    603603 
    604604    tctx->progress_count++; 
    605605    tctx->progress_bytes += (uintmax_t) add; 
  • src/filemanager/find.c

    a b  
    199199 
    200200static find_file_options_t options = { 
    201201    TRUE, TRUE, TRUE, FALSE, FALSE, 
    202     FALSE, TRUE, FALSE, FALSE, FALSE, FALSE 
     202    FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, 
     203    FALSE, 
     204    NULL 
    203205}; 
    204206 
    205207static char *in_start_dir = INPUT_LAST_TEXT; 
  • src/keybind-defaults.c

    a b  
    272272 
    273273/* tree */ 
    274274static const global_keymap_ini_t default_tree_keymap[] = { 
    275     {"Help = f1"}, 
    276     {"Rescan = f2; ctrl-r"}, 
    277     {"Forget = f3"}, 
    278     {"ToggleNavigation = f4"}, 
    279     {"Copy = f5"}, 
    280     {"Move = f6"}, 
     275    {"Help", "f1"}, 
     276    {"Rescan", "f2; ctrl-r"}, 
     277    {"Forget", "f3"}, 
     278    {"ToggleNavigation", "f4"}, 
     279    {"Copy", "f5"}, 
     280    {"Move", "f6"}, 
    281281#if 0 
    282282    {"MakeDir", "f7"}, 
    283283#endif