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

File mc-3547-cleanup-conversion-warning-lock_c.patch, 534 bytes (added by and, 7 years ago)
  • lib/lock.c

    fix -Wconversion warning at lock.c
    
    lock.c:184:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    
    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  
    178178static char * 
    179179lock_get_info (const char *lockfname) 
    180180{ 
    181     int cnt; 
     181    ssize_t cnt; 
    182182    static char buf[BUF_SIZE]; 
    183183 
    184184    cnt = readlink (lockfname, buf, BUF_SIZE - 1);