From f7ff2c6d254e75f0817f3b85adfef46d53fbfdfe Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Sat, 20 Feb 2016 16:08:02 +0000
Subject: [PATCH] filemanager/layout.c: cleanup -Wcast-qual warning
layout.c: In function 'setup_cmdline':
layout.c:810:24: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
char *tmp_prompt = (char *) mc_prompt;
^
Signed-off-by: Andreas Mohr <and@gmx.li>
index b97921a..171f3d2 100644
a
|
b
|
setup_cmdline (void) |
807 | 807 | { |
808 | 808 | int prompt_width; |
809 | 809 | int y; |
810 | | char *tmp_prompt = (char *) mc_prompt; |
| 810 | char *tmp_prompt = NULL; |
811 | 811 | |
812 | 812 | #ifdef ENABLE_SUBSHELL |
813 | 813 | if (mc_global.tty.use_subshell) |
… |
… |
setup_cmdline (void) |
816 | 816 | (void) strip_ctrl_codes (tmp_prompt); |
817 | 817 | } |
818 | 818 | #endif |
| 819 | if (tmp_prompt == NULL) |
| 820 | tmp_prompt = g_strdup (mc_prompt); |
819 | 821 | |
820 | 822 | prompt_width = str_term_width1 (tmp_prompt); |
821 | 823 | |
… |
… |
setup_cmdline (void) |
833 | 835 | if (mc_global.tty.use_subshell) |
834 | 836 | { |
835 | 837 | subshell_prompt = g_string_new (tmp_prompt); |
836 | | g_free (tmp_prompt); |
837 | 838 | mc_prompt = subshell_prompt->str; |
838 | 839 | } |
839 | 840 | #endif |
| 841 | g_free (tmp_prompt); |
840 | 842 | |
841 | 843 | y = LINES - 1 - mc_global.keybar_visible; |
842 | 844 | |