Ticket #3693: mc-3641-cleanup-Wformat-signedness-ftpfs_c.patch

File mc-3641-cleanup-Wformat-signedness-ftpfs_c.patch, 1.1 KB (added by andrew_b, 8 years ago)
  • src/vfs/ftpfs/ftpfs.c

    From dc33b923aae1053cea2e8091e478af70fa829c85 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Sat, 17 Sep 2016 12:06:36 +0000
    Subject: [PATCH] (ftpfs.c) Cleanup -Wformat-signedness warning
    
    Cleanup -Wformat-signedness warning.
    
    ftpfs.c: In function 'ftpfs_chmod':
    ftpfs.c:2029:52: error: format '%o' expects argument of type 'unsigned int', but argument 4 has type 'int' [-Werror=format=]
         g_snprintf (buf, sizeof (buf), "SITE CHMOD %4.4o /%%s", (int) (mode & 07777));
                                                        ^
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/vfs/ftpfs/ftpfs.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/vfs/ftpfs/ftpfs.c b/src/vfs/ftpfs/ftpfs.c
    index 4b993df..d90b219 100644
    a b ftpfs_chmod (const vfs_path_t * vpath, mode_t mode) 
    20262026    char buf[BUF_SMALL]; 
    20272027    int ret; 
    20282028 
    2029     g_snprintf (buf, sizeof (buf), "SITE CHMOD %4.4o /%%s", (int) (mode & 07777)); 
     2029    g_snprintf (buf, sizeof (buf), "SITE CHMOD %4.4o /%%s", (unsigned int) (mode & 07777)); 
    20302030 
    20312031    ret = ftpfs_send_command (vpath, buf, OPT_FLUSH); 
    20322032