diff options
Diffstat (limited to 'cmd-line-utils/readline/complete.c')
-rw-r--r-- | cmd-line-utils/readline/complete.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/cmd-line-utils/readline/complete.c b/cmd-line-utils/readline/complete.c index df0a698b81f..f4c361789b7 100644 --- a/cmd-line-utils/readline/complete.c +++ b/cmd-line-utils/readline/complete.c @@ -360,15 +360,15 @@ rl_complete (ignore, invoking_key) /* List the possible completions. See description of rl_complete (). */ int -rl_possible_completions (ignore, invoking_key) - int ignore, invoking_key; +rl_possible_completions (int ignore __attribute__((unused)), + int invoking_key __attribute__((unused))) { return (rl_complete_internal ('?')); } int -rl_insert_completions (ignore, invoking_key) - int ignore, invoking_key; +rl_insert_completions (int ignore __attribute__((unused)), + int invoking_key __attribute__((unused))) { return (rl_complete_internal ('*')); } @@ -760,10 +760,7 @@ print_filename (to_print, full_pathname) } static char * -rl_quote_filename (s, rtype, qcp) - char *s; - int rtype; - char *qcp; +rl_quote_filename (char *s, int rtype __attribute__((unused)), char *qcp) { char *r; @@ -871,7 +868,7 @@ _rl_find_completion_word (fp, dp) completion, so use the word break characters to find the substring on which to complete. */ #if defined (HANDLE_MULTIBYTE) - while (rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_ANY)) + while ((rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_ANY))) #else while (--rl_point) #endif @@ -1805,7 +1802,7 @@ rl_completion_matches (text, entry_function) match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *)); match_list[1] = (char *)NULL; - while (string = (*entry_function) (text, matches)) + while ((string = (*entry_function) (text, matches))) { if (matches + 1 == match_list_size) match_list = (char **)xrealloc @@ -1855,7 +1852,7 @@ rl_username_completion_function (text, state) setpwent (); } - while (entry = getpwent ()) + while ((entry = getpwent ())) { /* Null usernames should result in all users as possible completions. */ if (namelen == 0 || (STREQN (username, entry->pw_name, namelen))) @@ -2091,8 +2088,7 @@ rl_filename_completion_function (text, state) hit the end of the match list, we restore the original unmatched text, ring the bell, and reset the counter to zero. */ int -rl_menu_complete (count, ignore) - int count, ignore; +rl_menu_complete (int count, int ignore __attribute__((unused))) { rl_compentry_func_t *our_func; int matching_filenames, found_quote; |