Mercurial > vim
diff src/undo.c @ 35829:3e5c832bba3f v9.1.0633
patch 9.1.0633: Compilation warnings with `-Wunused-parameter`
Commit: https://github.com/vim/vim/commit/0268ff3af3d598e18454a3ce1c510f411427b6c0
Author: Dominique Pell? <dominique.pelle@gmail.com>
Date: Sun Jul 28 21:12:20 2024 +0200
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 28 Jul 2024 21:30:08 +0200 |
parents | 8303936dbd64 |
children | e0657b9d2920 |
line wrap: on
line diff
--- a/src/undo.c +++ b/src/undo.c @@ -3683,7 +3683,7 @@ u_eval_tree(buf_T *buf, u_header_T *firs * "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;