From da6f2bc159f5aa3115688b92d5594b1c0696e1ae Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Thu, 26 Nov 2015 20:40:07 +0000
Subject: [PATCH] (add2hotlist_cmd) fix -Wformat-nonliteral
hotlist.c:1576:34: warning: format string is not a string literal [-Wformat-nonliteral]
and remove unnecessary ENABLE_NLS switch
Signed-off-by: Andreas Mohr <and@gmx.li>
---
src/filemanager/hotlist.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/filemanager/hotlist.c b/src/filemanager/hotlist.c
index 3c13c34..71cd3f9 100644
a
|
b
|
void |
1563 | 1563 | add2hotlist_cmd (void) |
1564 | 1564 | { |
1565 | 1565 | char *lc_prompt; |
1566 | | const char *cp = N_("Label for \"%s\":"); |
1567 | 1566 | int l; |
1568 | 1567 | char *label_string, *label; |
1569 | 1568 | |
1570 | | #ifdef ENABLE_NLS |
1571 | | cp = _(cp); |
1572 | | #endif |
1573 | | |
1574 | | l = str_term_width1 (cp); |
| 1569 | l = str_term_width1 (_("Label for \"%s\":")); |
1575 | 1570 | label_string = vfs_path_to_str_flags (current_panel->cwd_vpath, 0, VPF_STRIP_PASSWORD); |
1576 | | lc_prompt = g_strdup_printf (cp, str_trunc (label_string, COLS - 2 * UX - (l + 8))); |
| 1571 | lc_prompt = g_strdup_printf (_("Label for \"%s\":"), str_trunc (label_string, COLS - 2 * UX - (l + 8))); |
1577 | 1572 | label = |
1578 | 1573 | input_dialog (_("Add to hotlist"), lc_prompt, MC_HISTORY_HOTLIST_ADD, label_string, |
1579 | 1574 | INPUT_COMPLETE_NONE); |