aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorBartosz Miera <bartopik@gmail.com>2019-07-29 00:52:24 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-07-29 00:52:24 +0200
commit16727dcf1e76b5a0b47a3b3b499780d58f4a043a (patch)
tree5a4547161516c3d51afd1dd935b1b2045f02463d /src/nvim/eval.c
parent7cc2b723d43c73653daa41fcfac623632faa9695 (diff)
downloadrneovim-16727dcf1e76b5a0b47a3b3b499780d58f4a043a.tar.gz
rneovim-16727dcf1e76b5a0b47a3b3b499780d58f4a043a.tar.bz2
rneovim-16727dcf1e76b5a0b47a3b3b499780d58f4a043a.zip
clang/"dead assignments" #10620
Also revert possibly-wrong change in f_sign_getplaced() from 652be3cb0040.
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 38df22a2cb..d13b5965f9 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -16032,10 +16032,12 @@ static void f_sign_getplaced(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
if ((di = tv_dict_find(dict, "lnum", -1)) != NULL) {
// get signs placed at this line
- lnum = tv_get_lnum(&di->di_tv);
- if (lnum <= 0) {
+ lnum = (linenr_T)tv_get_number_chk(&di->di_tv, &notanum);
+ if (notanum) {
return;
}
+ (void)lnum;
+ lnum = tv_get_lnum(&di->di_tv);
}
if ((di = tv_dict_find(dict, "id", -1)) != NULL) {
// get sign placed with this identifier
@@ -16164,6 +16166,7 @@ static void f_sign_place(typval_T *argvars, typval_T *rettv, FunPtr fptr)
if (notanum) {
goto cleanup;
}
+ (void)lnum;
lnum = tv_get_lnum(&di->di_tv);
}
if ((di = tv_dict_find(dict, "priority", -1)) != NULL) {