From 6e318ab0410d348c106e870d5347a3bf7224fe91 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Fri, 22 Jul 2005 09:29:50 +0000 Subject: [PATCH] * help.c: Fixed shadowing warnings from gcc. --- src/ChangeLog | 1 + src/help.c | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b573b43a0..e7ba89bde 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ * help.c: Fixed an invalid memory access, which has been noted by Vitja Makarov. And fixed a bug that had been introduced by me, when replacing Dlg_head * with void *. + * help.c: Fixed shadowing warnings from gcc. 2005-07-20 Roland Illig diff --git a/src/help.c b/src/help.c index 7df109e78..33ebd6f94 100644 --- a/src/help.c +++ b/src/help.c @@ -476,9 +476,9 @@ static void help_show (Dlg_head *h, const char *paint_start) } static int -help_event (Gpm_Event *event, void *data) +help_event (Gpm_Event *event, void *vp) { - Widget *w = data; + Widget *w = vp; Link_Area *current_area; if (! (event->type & GPM_UP)) @@ -548,9 +548,9 @@ help_event (Gpm_Event *event, void *data) /* show help */ static void -help_help_cmd (void *v) +help_help_cmd (void *vp) { - Dlg_head *h = v; + Dlg_head *h = vp; const char *p; history_ptr = (history_ptr+1) % HISTORY_SIZE; @@ -567,9 +567,9 @@ help_help_cmd (void *v) } static void -help_index_cmd (void *v) +help_index_cmd (void *vp) { - Dlg_head *h = v; + Dlg_head *h = vp; const char *new_item; if (!(new_item = search_string (data, "[Contents]"))) { @@ -587,14 +587,14 @@ help_index_cmd (void *v) help_callback (h, DLG_DRAW, 0); } -static void help_quit_cmd (void *x) +static void help_quit_cmd (void *vp) { - dlg_stop ((Dlg_head *)x); + dlg_stop ((Dlg_head *) vp); } -static void prev_node_cmd (void *data) +static void prev_node_cmd (void *vp) { - Dlg_head *h = data; + Dlg_head *h = vp; currentpoint = startpoint = history [history_ptr].page; selected_item = history [history_ptr].link; history_ptr--; @@ -621,21 +621,21 @@ mousedispatch_new (int y, int x, int yl, int xl) return w; } -static void help_cmk_move_backward(void *data, int lines) { - (void) &data; +static void help_cmk_move_backward(void *vp, int lines) { + (void) &vp; move_backward(lines); } -static void help_cmk_move_forward(void *data, int lines) { - (void) &data; +static void help_cmk_move_forward(void *vp, int lines) { + (void) &vp; move_forward(lines); } -static void help_cmk_moveto_top(void *data, int lines) { - (void) &data; +static void help_cmk_moveto_top(void *vp, int lines) { + (void) &vp; (void) &lines; move_to_top(); } -static void help_cmk_moveto_bottom(void *data, int lines) { - (void) &data; +static void help_cmk_moveto_bottom(void *vp, int lines) { + (void) &vp; (void) &lines; move_to_bottom(); }