mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.1055: Coverity warns for using uninitialized memory
Problem: Coverity warns for using uninitialized memory. Solution: Clear the "lhs" field earlier.
This commit is contained in:
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1055,
|
||||||
/**/
|
/**/
|
||||||
1054,
|
1054,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -2220,6 +2220,7 @@ compile_assignment(
|
|||||||
char_u *sp;
|
char_u *sp;
|
||||||
int is_decl = is_decl_command(cmdidx);
|
int is_decl = is_decl_command(cmdidx);
|
||||||
lhs_T lhs;
|
lhs_T lhs;
|
||||||
|
CLEAR_FIELD(lhs);
|
||||||
long start_lnum = SOURCING_LNUM;
|
long start_lnum = SOURCING_LNUM;
|
||||||
|
|
||||||
int has_arg_is_set_prefix = STRNCMP(arg, "ifargisset ", 11) == 0;
|
int has_arg_is_set_prefix = STRNCMP(arg, "ifargisset ", 11) == 0;
|
||||||
@@ -2244,8 +2245,6 @@ compile_assignment(
|
|||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return *arg == '[' ? arg : NULL;
|
return *arg == '[' ? arg : NULL;
|
||||||
|
|
||||||
lhs.lhs_name = NULL;
|
|
||||||
|
|
||||||
if (eap->cmdidx == CMD_increment || eap->cmdidx == CMD_decrement)
|
if (eap->cmdidx == CMD_increment || eap->cmdidx == CMD_decrement)
|
||||||
{
|
{
|
||||||
if (VIM_ISWHITE(eap->cmd[2]))
|
if (VIM_ISWHITE(eap->cmd[2]))
|
||||||
|
Reference in New Issue
Block a user