diff options
author | Dundar Göc <gocdundar@gmail.com> | 2022-01-28 22:54:03 +0100 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2022-01-30 19:16:51 +0100 |
commit | 2793fcae0ac2aef14c8f22636d579c68a97c0851 (patch) | |
tree | 5cddb34fa2afee8587a11aa5b431b7859b451536 /src/nvim/ex_eval.c | |
parent | 46bd48f7e902250dbccdea71ec6eb3888588133f (diff) | |
download | rneovim-2793fcae0ac2aef14c8f22636d579c68a97c0851.tar.gz rneovim-2793fcae0ac2aef14c8f22636d579c68a97c0851.tar.bz2 rneovim-2793fcae0ac2aef14c8f22636d579c68a97c0851.zip |
vim-patch:8.2.4241: some type casts are redundant
Problem: Some type casts are redundant.
Solution: Remove the type casts. (closes vim/vim#9643)
https://github.com/vim/vim/commit/420fabcd4ffeaf79082a6e43db91e1d363f88f27
This is not a literal port but an equivalent one.
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r-- | src/nvim/ex_eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index b1c59a607c..851828afcf 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -599,7 +599,7 @@ static void catch_exception(except_T *excp) { excp->caught = caught_stack; caught_stack = excp; - set_vim_var_string(VV_EXCEPTION, (char *)excp->value, -1); + set_vim_var_string(VV_EXCEPTION, excp->value, -1); if (*excp->throw_name != NUL) { if (excp->throw_lnum != 0) { vim_snprintf((char *)IObuff, IOSIZE, _("%s, line %" PRId64), @@ -650,7 +650,7 @@ static void finish_exception(except_T *excp) } caught_stack = caught_stack->caught; if (caught_stack != NULL) { - set_vim_var_string(VV_EXCEPTION, (char *)caught_stack->value, -1); + set_vim_var_string(VV_EXCEPTION, caught_stack->value, -1); if (*caught_stack->throw_name != NUL) { if (caught_stack->throw_lnum != 0) { vim_snprintf((char *)IObuff, IOSIZE, @@ -733,7 +733,7 @@ static void report_pending(int action, int pending, void *value) vim_snprintf((char *)IObuff, IOSIZE, mesg, _("Exception")); mesg = (char *)concat_str(IObuff, (char_u *)": %s"); - s = (char *)((except_T *)value)->value; + s = ((except_T *)value)->value; } else if ((pending & CSTP_ERROR) && (pending & CSTP_INTERRUPT)) { s = _("Error and interrupt"); } else if (pending & CSTP_ERROR) { @@ -1620,7 +1620,7 @@ void ex_endtry(exarg_T *eap) // the finally clause. The latter case need not be tested since then // anything pending has already been discarded. bool skip = did_emsg || got_int || current_exception - || !(cstack->cs_flags[cstack->cs_idx] & CSF_TRUE); + || !(cstack->cs_flags[cstack->cs_idx] & CSF_TRUE); if (!(cstack->cs_flags[cstack->cs_idx] & CSF_TRY)) { eap->errmsg = get_end_emsg(cstack); |