Mercurial > vim
comparison src/vim9cmds.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 | 3cacfb652766 |
children |
comparison
equal
deleted
inserted
replaced
35828:739a162a93b3 | 35829:3e5c832bba3f |
---|---|
1637 | 1637 |
1638 /* | 1638 /* |
1639 * Compile "catch {expr}". | 1639 * Compile "catch {expr}". |
1640 */ | 1640 */ |
1641 char_u * | 1641 char_u * |
1642 compile_catch(char_u *arg, cctx_T *cctx UNUSED) | 1642 compile_catch(char_u *arg, cctx_T *cctx) |
1643 { | 1643 { |
1644 scope_T *scope = cctx->ctx_scope; | 1644 scope_T *scope = cctx->ctx_scope; |
1645 garray_T *instr = &cctx->ctx_instr; | 1645 garray_T *instr = &cctx->ctx_instr; |
1646 char_u *p; | 1646 char_u *p; |
1647 isn_T *isn; | 1647 isn_T *isn; |
1921 | 1921 |
1922 /* | 1922 /* |
1923 * compile "throw {expr}" | 1923 * compile "throw {expr}" |
1924 */ | 1924 */ |
1925 char_u * | 1925 char_u * |
1926 compile_throw(char_u *arg, cctx_T *cctx UNUSED) | 1926 compile_throw(char_u *arg, cctx_T *cctx) |
1927 { | 1927 { |
1928 char_u *p = skipwhite(arg); | 1928 char_u *p = skipwhite(arg); |
1929 | 1929 |
1930 if (compile_expr0(&p, cctx) == FAIL) | 1930 if (compile_expr0(&p, cctx) == FAIL) |
1931 return NULL; | 1931 return NULL; |