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

File mc-3641-cleanup-Wformat-signedness-common_c.patch, 1.1 KB (added by andrew_b, 5 years ago)
  • src/subshell/common.c

    From 28fdf300e16671bf06501d096f955ad530345182 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Sat, 17 Sep 2016 12:09:47 +0000
    Subject: [PATCH] (common.c) Cleanup -Wformat-signedness warning
    
    Cleanup -Wformat-signedness warning.
    
    common.c:330:26: error: format '%d' expects argument of type 'int', but argument 3 has type 'unsigned int' [-Werror=format=]
             fprintf (stderr, __FILE__ ": unimplemented subshell type %d\r\n", mc_global.shell->type);
                              ^~~~~~~~
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/subshell/common.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/subshell/common.c b/src/subshell/common.c
    index 98968fa..a1f054e 100644
    a b init_subshell_child (const char *pty_name) 
    327327        break; 
    328328 
    329329    default: 
    330         fprintf (stderr, __FILE__ ": unimplemented subshell type %d\r\n", mc_global.shell->type); 
     330        fprintf (stderr, __FILE__ ": unimplemented subshell type %u\r\n", mc_global.shell->type); 
    331331        my_exit (FORK_FAILURE); 
    332332    } 
    333333