aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-14 17:54:48 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-04-14 18:04:12 +0800
commit3be966f725bfefd7215acd0aad155c94b813d53f (patch)
treedd54e88754d71073fb58224fc0ba2891ef0ca7ed
parentf12afd8e166e503fa0df80f932d338558afe3c3f (diff)
downloadrneovim-3be966f725bfefd7215acd0aad155c94b813d53f.tar.gz
rneovim-3be966f725bfefd7215acd0aad155c94b813d53f.tar.bz2
rneovim-3be966f725bfefd7215acd0aad155c94b813d53f.zip
vim-patch:9.0.1452: code using EVAL_CONSTANT is dead, it is never set
Problem: Code using EVAL_CONSTANT is dead, it is never set. Solution: Remove EVAL_CONSTANT. (closes vim/vim#12252) https://github.com/vim/vim/commit/b7f6f93475a3ad5c590a09a2577fd51590bea9e1
-rw-r--r--src/nvim/eval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 59e998d50f..d5a794da01 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -2386,7 +2386,7 @@ int eval1(char **arg, typval_T *rettv, evalarg_T *const evalarg)
}
*arg = skipwhite(*arg + 1);
evalarg_used->eval_flags = (op_falsy ? !result : result)
- ? orig_flags : orig_flags & ~EVAL_EVALUATE;
+ ? orig_flags : (orig_flags & ~EVAL_EVALUATE);
typval_T var2;
if (eval1(arg, &var2, evalarg_used) == FAIL) {
evalarg_used->eval_flags = orig_flags;
@@ -2410,7 +2410,7 @@ int eval1(char **arg, typval_T *rettv, evalarg_T *const evalarg)
// Get the third variable. Recursive!
*arg = skipwhite(*arg + 1);
- evalarg_used->eval_flags = !result ? orig_flags : orig_flags & ~EVAL_EVALUATE;
+ evalarg_used->eval_flags = !result ? orig_flags : (orig_flags & ~EVAL_EVALUATE);
if (eval1(arg, &var2, evalarg_used) == FAIL) {
if (evaluate && result) {
tv_clear(rettv);
@@ -2476,7 +2476,7 @@ static int eval2(char **arg, typval_T *rettv, evalarg_T *const evalarg)
while (p[0] == '|' && p[1] == '|') {
// Get the second variable.
*arg = skipwhite(*arg + 2);
- evalarg_used->eval_flags = !result ? orig_flags : orig_flags & ~EVAL_EVALUATE;
+ evalarg_used->eval_flags = !result ? orig_flags : (orig_flags & ~EVAL_EVALUATE);
typval_T var2;
if (eval3(arg, &var2, evalarg_used) == FAIL) {
return FAIL;
@@ -2554,7 +2554,7 @@ static int eval3(char **arg, typval_T *rettv, evalarg_T *const evalarg)
while (p[0] == '&' && p[1] == '&') {
// Get the second variable.
*arg = skipwhite(*arg + 2);
- evalarg_used->eval_flags = result ? orig_flags : orig_flags & ~EVAL_EVALUATE;
+ evalarg_used->eval_flags = result ? orig_flags : (orig_flags & ~EVAL_EVALUATE);
typval_T var2;
if (eval4(arg, &var2, evalarg_used) == FAIL) {
return FAIL;