Ticket #3641: mc-3641-cleanup-Wformat-signedness-file_c.patch

File mc-3641-cleanup-Wformat-signedness-file_c.patch, 1.2 KB (added by and, 8 years ago)
  • src/filemanager/file.c

    From 1a35a2bb2b3ef9ac5b1f87dd109b9adad641388a Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Sat, 17 Sep 2016 12:05:41 +0000
    Subject: [PATCH] (file.c) Cleanup -Wformat-signedness warning
    
    Cleanup -Wformat-signedness warning.
    
    file.c:2526:41: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
         label_set_textv (dsm->count_size, _("Directories: %zd, total size: %s"),
                                             ^
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/filemanager/file.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/filemanager/file.c b/src/filemanager/file.c
    index 3eb8b65..ff97997 100644
    a b dirsize_status_update_cb (status_msg_t * sm) 
    25232523    Widget *wd = WIDGET (sm->dlg); 
    25242524 
    25252525    /* update second (longer label) */ 
    2526     label_set_textv (dsm->count_size, _("Directories: %zd, total size: %s"), 
     2526    label_set_textv (dsm->count_size, _("Directories: %zu, total size: %s"), 
    25272527                     dsm->dir_count, size_trunc_sep (dsm->total_size, panels_options.kilobyte_si)); 
    25282528 
    25292529    /* enlarge dialog if required */