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

File mc-3547-cleanup-conversion-warning-gauge_c.patch, 741 bytes (added by and, 7 years ago)
  • lib/widget/gauge.c

    fix -Wconversion warning at gauge.c
    
    gauge.c:101:51: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
    gauge.c:102:58: warning: implicit conversion loses integer precision: '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 d  
    8080        { 
    8181            int gauge_len; 
    8282            int percentage, columns; 
    83             long total = g->max; 
    84             long done = g->current; 
     83            int total = g->max; 
     84            int done = g->current; 
    8585 
    8686            if (total <= 0 || done < 0) 
    8787            {