From 1bc9da328a145b8b134f131149995d6d9728df59 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Sat, 20 Feb 2016 13:23:14 +0000
Subject: [PATCH] editor/edit_dialogs.c: cleanup -Wcast-qual warning
editcmd_dialogs.c:109:44: warning: to be safe all intermediate pointers in cast from 'gchar ** {aka char **}' to 'const char **' must be 'const' qualified [-Wcast-qual]
QUICK_RADIO (num_of_types, (const char **) list_of_types,
^
editcmd_dialogs.c:209:44: warning: to be safe all intermediate pointers in cast from 'gchar ** {aka char **}' to 'const char **' must be 'const' qualified [-Wcast-qual]
QUICK_RADIO (num_of_types, (const char **) list_of_types,
^
editcmd_dialogs.c: In function 'editcmd_dialog_completion_show':
../../lib/widget/widget-common.h:13:20: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
#define WIDGET(x) ((Widget *)(x))
^
editcmd_dialogs.c:349:24: note: in expansion of macro 'WIDGET'
const Widget *we = WIDGET (edit)
^
Signed-off-by: Andreas Mohr <and@gmx.li>
---
src/editor/editcmd_dialogs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/editor/editcmd_dialogs.c b/src/editor/editcmd_dialogs.c
index ed436f8..eb53b1a 100644
a
|
b
|
editcmd_dialog_search_show (WEdit * edit) |
106 | 106 | INPUT_COMPLETE_NONE), |
107 | 107 | QUICK_SEPARATOR (TRUE), |
108 | 108 | QUICK_START_COLUMNS, |
109 | | QUICK_RADIO (num_of_types, (const char **) list_of_types, |
| 109 | QUICK_RADIO (num_of_types, (const char **)(void *) list_of_types, |
110 | 110 | (int *) &edit_search_options.type, NULL), |
111 | 111 | QUICK_NEXT_COLUMN, |
112 | 112 | QUICK_CHECKBOX (N_("Cas&e sensitive"), &edit_search_options.case_sens, NULL), |
… |
… |
editcmd_dialog_replace_show (WEdit * edit, const char *search_default, const cha |
206 | 206 | "replace", replace_text, NULL, FALSE, FALSE, INPUT_COMPLETE_NONE), |
207 | 207 | QUICK_SEPARATOR (TRUE), |
208 | 208 | QUICK_START_COLUMNS, |
209 | | QUICK_RADIO (num_of_types, (const char **) list_of_types, |
| 209 | QUICK_RADIO (num_of_types, (const char **)(void *) list_of_types, |
210 | 210 | (int *) &edit_search_options.type, NULL), |
211 | 211 | QUICK_NEXT_COLUMN, |
212 | 212 | QUICK_CHECKBOX (N_("Cas&e sensitive"), &edit_search_options.case_sens, NULL), |
… |
… |
editcmd_dialog_raw_key_query (const char *heading, const char *query, gboolean c |
346 | 346 | char * |
347 | 347 | editcmd_dialog_completion_show (const WEdit * edit, int max_len, GString ** compl, int num_compl) |
348 | 348 | { |
349 | | const Widget *we = WIDGET (edit); |
| 349 | const Widget *we = CWIDGET (edit); |
350 | 350 | int start_x, start_y, offset, i; |
351 | 351 | char *curr = NULL; |
352 | 352 | WDialog *compl_dlg; |