Ticket #3435: mc-cleanup-clang-warnings-04.patch

File mc-cleanup-clang-warnings-04.patch, 752 bytes (added by and, 10 years ago)
  • src/filemanager/file.c

    fix clang 3.6 compiler warnings
    
    patch 01: -Wundef
    patch 02: -Wunused-function
    patch 03: -Wnon-literal-null-conversion
    patch 04: -Wmissing-field-initializers
    patch 05: -Wabsolute-value
    patch 06: -Wtautological-pointer-compare
    patch 07: -Wformat
    
    file.c:602:42: error: missing field 'tv_usec' initializer [-Wmissing-field-initializers]
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    
    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 = { 0 }; 
     602    static struct timeval tv_start = { 0, 0 }; 
    603603 
    604604    tctx->progress_count++; 
    605605    tctx->progress_bytes += (uintmax_t) add;