0
0
mirror of https://github.com/vim/vim.git synced 2025-10-20 08:14:18 -04:00

patch 9.1.0633: Compilation warnings with -Wunused-parameter

Problem:  Compilation warnings with `-Wunused-parameter`
Solution: Add the `UNUSED` macro where needed, and remove some
          superfluous ones (Dominique Pellé)

Change fixes these kind of warnings when building without the channel
feature:

```
eval.c:6122:15: warning: unused parameter ‘tv’ [-Wunused-parameter]
     typval_T *tv,
               ^
eval.c:6123:14: warning: unused parameter ‘tofree’ [-Wunused-parameter]
     char_u **tofree,
              ^
eval.c:6124:13: warning: unused parameter ‘numbuf’ [-Wunused-parameter]
     char_u *numbuf,
             ^
eval.c:6125:10: warning: unused parameter ‘composite_val’ [-Wunused-parameter]
     int  composite_val)
```

closes: #15378

Signed-off-by: Dominique Pellé <dominique.pelle@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Dominique Pellé
2024-07-28 21:12:20 +02:00
committed by Christian Brabandt
parent 073cb02cb5
commit 0268ff3af3
12 changed files with 23 additions and 21 deletions

View File

@@ -3683,7 +3683,7 @@ u_eval_tree(buf_T *buf, u_header_T *first_uhp, list_T *list)
* "undofile(name)" function
*/
void
f_undofile(typval_T *argvars UNUSED, typval_T *rettv)
f_undofile(typval_T *argvars, typval_T *rettv)
{
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
@@ -3738,7 +3738,7 @@ u_undofile_reset_and_delete(buf_T *buf)
* "undotree(expr)" function
*/
void
f_undotree(typval_T *argvars UNUSED, typval_T *rettv)
f_undotree(typval_T *argvars, typval_T *rettv)
{
if (in_vim9script() && check_for_opt_buffer_arg(argvars, 0) == FAIL)
return;