diff --git a/src/ChangeLog b/src/ChangeLog index efb3eb573..a20447b8b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,22 @@ * main.c (maybe_cd): Removed unused parameter. * main.h: Likewise. * screen.c: Marked unused parameters. Updated use of maybe_cd. + * cons.handler.c: Marked unused parameters. + * dir.c: Likewise. + * find.c: Likewise. + * help.c: Likewise. + * layout.c: Likewise. + * mountlist.c: Likewise. + * popt.c: Likewise. + * poptconfig.c: Likewise. + * popthelp.c: Likewise. + * regex.c: Likewise. + * subshell.c: Likewise. + * tree.c: Likewise. + * util.c: Likewise. + * utilunix.c: Likewise. + * widget.c: Likewise. + * wtools.c: Likewise. 2005-02-08 Roland Illig diff --git a/src/cons.handler.c b/src/cons.handler.c index 5323d2ee1..b6502ba85 100644 --- a/src/cons.handler.c +++ b/src/cons.handler.c @@ -380,6 +380,8 @@ show_console_contents (int starty, unsigned char begin_line, void handle_console (unsigned char action) { + (void) action; + if (look_for_rxvt_extensions ()) return; diff --git a/src/dir.c b/src/dir.c index 631dd15a8..9d0ee1232 100644 --- a/src/dir.c +++ b/src/dir.c @@ -111,6 +111,8 @@ static int string_sortcomp (const char *str1, const char *str2) int unsorted (const file_entry *a, const file_entry *b) { + (void) a; + (void) b; return 0; } diff --git a/src/find.c b/src/find.c index c0b74518f..7f1d75a15 100644 --- a/src/find.c +++ b/src/find.c @@ -404,6 +404,8 @@ find_add_match (Dlg_head *h, const char *dir, const char *file) { int p = ++matches & 7; + (void) h; + insert_file (dir, file); /* Scroll nicely */ @@ -815,6 +817,8 @@ find_callback (struct Dlg_head *h, dlg_msg_t msg, int parm) static int start_stop (int button) { + (void) button; + running = is_start; set_idle_proc (find_dlg, running); is_start = !is_start; @@ -829,6 +833,8 @@ start_stop (int button) static int find_do_view_file (int button) { + (void) button; + view_edit_currently_selected_file (0, 0); return 0; } @@ -837,6 +843,8 @@ find_do_view_file (int button) static int find_do_edit_file (int button) { + (void) button; + view_edit_currently_selected_file (0, 1); return 0; } diff --git a/src/help.c b/src/help.c index 0ec15fcc9..db2ea785b 100644 --- a/src/help.c +++ b/src/help.c @@ -247,6 +247,8 @@ static void move_backward (int i) static void move_to_top (int dummy) { + (void) dummy; + while (currentpoint > data && *currentpoint != CHAR_NODE_END) currentpoint--; while (*currentpoint != ']') @@ -257,6 +259,8 @@ static void move_to_top (int dummy) static void move_to_bottom (int dummy) { + (void) dummy; + while (*currentpoint && *currentpoint != CHAR_NODE_END) currentpoint++; currentpoint--; @@ -289,7 +293,7 @@ static const char *help_follow_link (const char *start, const char *selected_ite return _(" Help file format error\n"); } -static const char *select_next_link (const char *start, const char *current_link) +static const char *select_next_link (const char *current_link) { const char *p; @@ -595,6 +599,7 @@ static void prev_node_cmd (Dlg_head *h) static cb_ret_t md_callback (Widget *w, widget_msg_t msg, int parm) { + (void) w; return default_proc (msg, parm); } @@ -655,8 +660,7 @@ help_handle_key (struct Dlg_head *h, int c) case KEY_DOWN: case '\t': - /* select next link */ - new_item = select_next_link (startpoint, selected_item); + new_item = select_next_link (selected_item); if (new_item){ selected_item = new_item; if (selected_item >= last_shown){ diff --git a/src/layout.c b/src/layout.c index 538000e31..13ae3f8f0 100644 --- a/src/layout.c +++ b/src/layout.c @@ -225,6 +225,8 @@ static void update_split (void) static int b2left_cback (int action) { + (void) action; + if (_equal_split){ /* Turn equal split off */ _equal_split = 0; @@ -238,6 +240,8 @@ static int b2left_cback (int action) static int b2right_cback (int action) { + (void) action; + if (_equal_split){ /* Turn equal split off */ _equal_split = 0; @@ -251,6 +255,8 @@ static int b2right_cback (int action) static int bplus_cback (int action) { + (void) action; + if (_output_lines < 99) _output_lines++; return 0; @@ -258,6 +264,8 @@ static int bplus_cback (int action) static int bminus_cback (int action) { + (void) action; + if (_output_lines > 0) _output_lines--; return 0; @@ -721,6 +729,7 @@ setup_panels (void) void flag_winch (int dummy) { + (void) dummy; #ifndef USE_NCURSES /* don't do malloc in a signal handler */ low_level_change_screen_size (); #endif diff --git a/src/mountlist.c b/src/mountlist.c index 9cf7845a6..df00f29e4 100644 --- a/src/mountlist.c +++ b/src/mountlist.c @@ -231,6 +231,9 @@ read_filesystem_list (int need_fs_type, int all_fs) struct mount_entry *me; struct mount_entry *mtail; + (void) need_fs_type; + (void) all_fs; + /* Start the list off with a dummy entry. */ me = (struct mount_entry *) malloc (sizeof (struct mount_entry)); me->me_next = NULL; diff --git a/src/popt.c b/src/popt.c index 40c7715dc..ba4328206 100644 --- a/src/popt.c +++ b/src/popt.c @@ -228,6 +228,7 @@ static void execCommand(poptContext con) { execvp(argv[0], argv); #else + (void) con; abort(); #endif } @@ -507,6 +508,8 @@ int poptAddAlias(poptContext con, struct poptAlias newAlias, int flags) { int aliasNum = con->numAliases++; struct poptAlias * alias; + (void) flags; + /* SunOS won't realloc(NULL, ...) */ if (!con->aliases) con->aliases = malloc(sizeof(newAlias) * con->numAliases); diff --git a/src/poptconfig.c b/src/poptconfig.c index 7a471e911..76ce7cd69 100644 --- a/src/poptconfig.c +++ b/src/poptconfig.c @@ -130,6 +130,8 @@ int poptReadDefaultConfig(poptContext con, int useEnv) { const char* home; int rc; + (void) useEnv; + if (!con->appName) return 0; rc = poptReadConfigFile(con, "/etc/popt"); diff --git a/src/popthelp.c b/src/popthelp.c index d8189082d..a1e25a582 100644 --- a/src/popthelp.c +++ b/src/popthelp.c @@ -19,7 +19,12 @@ static void displayArgs(poptContext con, enum poptCallbackReason foo, struct poptOption * key, - const char * arg, void * data) { + const char * arg, void * data) +{ + (void) foo; + (void) arg; + (void) data; + if (key->shortName== '?') poptPrintHelp(con, stdout, 0); else @@ -52,6 +57,8 @@ getTableTranslationDomain(const struct poptOption *table) static const char * getArgDescrip(const struct poptOption * opt, const char *translation_domain) { + (void) translation_domain; + if (!(opt->argInfo & POPT_ARG_MASK)) return NULL; if (opt == (poptHelpOptions + 1) || opt == (poptHelpOptions + 2)) @@ -191,6 +198,8 @@ static int showHelpIntro(poptContext con, FILE * f) { int poptPrintHelp(poptContext con, FILE * f, int flags) { int leftColWidth; + (void) flags; + showHelpIntro(con, f); if (con->otherHelp) fprintf(f, " %s\n", con->otherHelp); @@ -288,6 +297,8 @@ static int showShortOptions(const struct poptOption * opt, FILE * f, void poptPrintUsage(poptContext con, FILE * f, int flags) { int cursor; + (void) flags; + cursor = showHelpIntro(con, f); cursor += showShortOptions(con->options, f, NULL); singleTableUsage(f, cursor, con->options, NULL); diff --git a/src/regex.c b/src/regex.c index 971b6fba2..30736d0bb 100644 --- a/src/regex.c +++ b/src/regex.c @@ -8230,6 +8230,8 @@ regerror (errcode, preg, errbuf, errbuf_size) const char *msg; size_t msg_size; + (void) preg; + if (errcode < 0 || errcode >= (int) (sizeof (re_error_msgid_idx) / sizeof (re_error_msgid_idx[0]))) diff --git a/src/subshell.c b/src/subshell.c index 290064a31..361c801dc 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -840,6 +840,8 @@ sigchld_handler (int sig) int status; pid_t pid; + (void) sig; + pid = waitpid (subshell_pid, &status, WUNTRACED | WNOHANG); if (pid == subshell_pid) { diff --git a/src/tree.c b/src/tree.c index 83f1e5a03..776be2aba 100644 --- a/src/tree.c +++ b/src/tree.c @@ -115,6 +115,7 @@ remove_callback (tree_entry *entry, void *data) static void tree_remove_entry (WTree *tree, char *name) { + (void) tree; tree_store_remove_entry (name); } @@ -142,12 +143,12 @@ static void save_tree (WTree *tree) { int error; + (void) tree; error = tree_store_save (); if (error){ fprintf (stderr, _("Cannot open the %s file for writing:\n%s\n"), MC_TREE, unix_error_string (error)); - return; } } diff --git a/src/util.c b/src/util.c index b579babd2..8ce02abf5 100644 --- a/src/util.c +++ b/src/util.c @@ -214,6 +214,7 @@ name_quote (const char *s, int quote_percent) char * fake_name_quote (const char *s, int quote_percent) { + (void) quote_percent; return g_strdup (s); } diff --git a/src/utilunix.c b/src/utilunix.c index c47bbb2ca..3b05988dc 100644 --- a/src/utilunix.c +++ b/src/utilunix.c @@ -63,6 +63,8 @@ mc_gid_compare (gconstpointer v, gconstpointer v2) static gint mc_gid_destroy (gpointer key, gpointer value, gpointer data) { + (void) key; + (void) data; g_free (value); return FALSE; diff --git a/src/widget.c b/src/widget.c index 585842a60..50c0cece7 100644 --- a/src/widget.c +++ b/src/widget.c @@ -1454,7 +1454,9 @@ int is_in_input_map (WInput *in, int c_code) { int i; - + + (void) in; + for (i = 0; input_map [i].fn; i++) if (c_code == input_map [i].key_code) { if (input_map [i].fn == complete) diff --git a/src/wtools.c b/src/wtools.c index ab48ddcbf..d980c1ed6 100644 --- a/src/wtools.c +++ b/src/wtools.c @@ -255,6 +255,7 @@ fg_message (int flags, const char *title, const char *text) static void bg_message (int dummy, int *flags, char *title, const char *text) { + (void) dummy; title = g_strconcat (_("Background process:"), " ", title, (char *) NULL); fg_message (*flags, title, text); g_free (title);