summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-08-11 19:14:00 +0200
committerBram Moolenaar <Bram@vim.org>2015-08-11 19:14:00 +0200
commitcde885473099296c4837de261833f48b24caf87c (patch)
tree7864f4147f9c3b57a77b649c7d14e8ad31cafa6c /src/normal.c
parentbd8539aac385d265d41da2e8ab59d7b9c3694557 (diff)
downloadvim-git-cde885473099296c4837de261833f48b24caf87c.tar.gz
patch 7.4.822v7.4.822
Problem: More problems reported by coverity. Solution: Avoid the warnings. (Christian Brabandt)
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/normal.c b/src/normal.c
index a46cc9d64..ae7b83ad2 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -2865,10 +2865,8 @@ do_mouse(oap, c, dir, count, fixindent)
end_visual.col = leftcol;
else
end_visual.col = rightcol;
- if (curwin->w_cursor.lnum <
+ if (curwin->w_cursor.lnum >=
(start_visual.lnum + end_visual.lnum) / 2)
- end_visual.lnum = end_visual.lnum;
- else
end_visual.lnum = start_visual.lnum;
/* move VIsual to the right column */
@@ -3807,8 +3805,8 @@ clear_showcmd()
}
# ifdef FEAT_FOLDING
/* Include closed folds as a whole. */
- hasFolding(top, &top, NULL);
- hasFolding(bot, NULL, &bot);
+ (void)hasFolding(top, &top, NULL);
+ (void)hasFolding(bot, NULL, &bot);
# endif
lines = bot - top + 1;
@@ -5954,7 +5952,7 @@ nv_scroll(cap)
lnum = curwin->w_topline;
while (n-- > 0 && lnum < curwin->w_botline - 1)
{
- hasFolding(lnum, NULL, &lnum);
+ (void)hasFolding(lnum, NULL, &lnum);
++lnum;
}
n = lnum - curwin->w_topline;
@@ -6254,7 +6252,7 @@ nv_gotofile(cap)
{
/* do autowrite if necessary */
if (curbufIsChanged() && curbuf->b_nwindows <= 1 && !P_HID(curbuf))
- autowrite(curbuf, FALSE);
+ (void)autowrite(curbuf, FALSE);
setpcmark();
(void)do_ecmd(0, ptr, NULL, NULL, ECMD_LAST,
P_HID(curbuf) ? ECMD_HIDE : 0, curwin);