patch 9.0.0364: clang static analyzer gives warnings
Problem: Clang static analyzer gives warnings.
Solution: Avoid the warnings. (Yegappan Lakshmanan, closes #11043)
diff --git a/src/ops.c b/src/ops.c
index 4733976..5629a1a 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -1282,11 +1282,11 @@
#ifdef FEAT_NETBEANS_INTG
if (netbeans_active() && one_change)
{
- char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
+ char_u *ptr;
netbeans_removed(curbuf, pos.lnum, bd.textcol,
(long)bd.textlen);
- // get the line again, it may have been flushed
+ // get the line now, it may have been flushed
ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
netbeans_inserted(curbuf, pos.lnum, bd.textcol,
&ptr[bd.textcol], bd.textlen);