Ticket #3598: mc-3598-0033-subshell-common.c-cleanup-Wcast-qual-warning.patch

File mc-3598-0033-subshell-common.c-cleanup-Wcast-qual-warning.patch, 1.0 KB (added by and, 8 years ago)
  • src/subshell/common.c

    From 8f57ff0e332a85e5ac25857d2696a7eb014fde2e Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Sat, 20 Feb 2016 16:32:32 +0000
    Subject: [PATCH] subshell/common.c: cleanup -Wcast-qual warning
    
    common.c: In function 'init_subshell_child':
    common.c:287:17: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
             putenv ((char *) "HISTCONTROL=ignoreboth");
                     ^
    
    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 0be0127..96f5912 100644
    a b init_subshell_child (const char *pty_name) 
    284284 
    285285        /* Make MC's special commands not show up in bash's history and also suppress 
    286286         * consecutive identical commands*/ 
    287         putenv ((char *) "HISTCONTROL=ignoreboth"); 
     287        putenv (g_strdup ("HISTCONTROL=ignoreboth")); 
    288288 
    289289        /* Allow alternative readline settings for MC */ 
    290290        {