1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[search] explicit casts to char *

This commit is contained in:
Witold Filipczyk 2022-02-21 19:33:10 +01:00
parent c7c9295eba
commit f7d0d5f77d

View File

@ -1782,7 +1782,7 @@ link_typeahead_handler(struct input_line *line, int action_id)
return INPUT_LINE_CANCEL; return INPUT_LINE_CANCEL;
} }
line->data = "#"; line->data = (char *)"#";
} }
switch (do_typeahead(ses, doc_view, buffer, action_id, &offset)) { switch (do_typeahead(ses, doc_view, buffer, action_id, &offset)) {
@ -1811,22 +1811,22 @@ enum frame_event_status
search_typeahead(struct session *ses, struct document_view *doc_view, search_typeahead(struct session *ses, struct document_view *doc_view,
action_id_T action_id) action_id_T action_id)
{ {
char *prompt = "#"; char *prompt = (char *)"#";
char *data = NULL; char *data = NULL;
input_line_handler_T handler = text_typeahead_handler; input_line_handler_T handler = text_typeahead_handler;
struct input_history *history = &search_history; struct input_history *history = &search_history;
switch (action_id) { switch (action_id) {
case ACT_MAIN_SEARCH_TYPEAHEAD_TEXT: case ACT_MAIN_SEARCH_TYPEAHEAD_TEXT:
prompt = data = "/"; prompt = data = (char *)"/";
break; break;
case ACT_MAIN_SEARCH_TYPEAHEAD_TEXT_BACK: case ACT_MAIN_SEARCH_TYPEAHEAD_TEXT_BACK:
prompt = data = "?"; prompt = data = (char *)"?";
break; break;
case ACT_MAIN_SEARCH_TYPEAHEAD_LINK: case ACT_MAIN_SEARCH_TYPEAHEAD_LINK:
data = "#"; data = (char *)"#";
/* Falling forward .. good punk rock */ /* Falling forward .. good punk rock */
case ACT_MAIN_SEARCH_TYPEAHEAD: case ACT_MAIN_SEARCH_TYPEAHEAD:
default: default: