]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0561: netbeans: variable used un-initialized (Coverity) v9.1.0561
authorChristian Brabandt <cb@256bit.org>
Thu, 11 Jul 2024 19:41:23 +0000 (21:41 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 11 Jul 2024 19:41:23 +0000 (21:41 +0200)
Problem:  netbeans: variable used un-initialized (Coverity)
          (after v9.1.0557)
Solution: properly initialize exarg_T struct for use with netbeans

The actual exarg.cmdidx doesn't really matter, but let's use something,
that is not affected by the recent changes (going through the buffer
list) and use CMD_USER.

closes: #15211

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/netbeans.c
src/version.c

index 3b68869195faa7ec03e5f50abfc1c0b240707ff4..781caa8994493f0fc4ee20a6ec4e915da228d70c 100644 (file)
@@ -1689,8 +1689,10 @@ nb_do_cmd(
            if (streq((char *)args, "T") && buf->bufp != curbuf)
            {
                exarg_T exarg;
+               CLEAR_FIELD(exarg);
                exarg.cmd = (char_u *)"goto";
                exarg.forceit = FALSE;
+               exarg.cmdidx = CMD_USER;
                dosetvisible = TRUE;
                goto_buffer(&exarg, DOBUF_FIRST, FORWARD, buf->bufp->b_fnum);
                do_update = 1;
index ddb02d1eed3e18fbda4716d5b466045652e67d13..15fc77584dfbbc5bf8222658da949cbb5833f828 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    561,
 /**/
     560,
 /**/