Skip to content

Commit ac77aec

Browse files
committed
patch 7.4.2106
Problem: Clang warns about missing field in initializer. Solution: Define COMMA and use it. (Kazunobu Kuriyama)
1 parent eec2981 commit ac77aec

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/ex_cmds.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4008,6 +4008,7 @@ do_ecmd(
40084008
}
40094009
vim_free(new_name);
40104010
au_new_curbuf.br_buf = NULL;
4011+
au_new_curbuf.br_buf_free_count = 0;
40114012
#endif
40124013
}
40134014

@@ -4389,6 +4390,7 @@ delbuf_msg(char_u *name)
43894390
name == NULL ? (char_u *)"" : name);
43904391
vim_free(name);
43914392
au_new_curbuf.br_buf = NULL;
4393+
au_new_curbuf.br_buf_free_count = 0;
43924394
}
43934395
#endif
43944396

src/globals.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ EXTERN int keep_filetype INIT(= FALSE); /* value for did_filetype when
384384

385385
/* When deleting the current buffer, another one must be loaded. If we know
386386
* which one is preferred, au_new_curbuf is set to it */
387-
EXTERN bufref_T au_new_curbuf INIT(= {NULL});
387+
EXTERN bufref_T au_new_curbuf INIT(= {NULL COMMA 0});
388388

389389
/* When deleting a buffer/window and autocmd_busy is TRUE, do not free the
390390
* buffer/window. but link it in the list starting with
@@ -1355,11 +1355,8 @@ EXTERN int term_is_xterm INIT(= FALSE); /* xterm-like 'term' */
13551355
#ifdef BACKSLASH_IN_FILENAME
13561356
EXTERN char psepc INIT(= '\\'); /* normal path separator character */
13571357
EXTERN char psepcN INIT(= '/'); /* abnormal path separator character */
1358-
EXTERN char pseps[2] /* normal path separator string */
1359-
# ifdef DO_INIT
1360-
= {'\\', 0}
1361-
# endif
1362-
;
1358+
/* normal path separator string */
1359+
EXTERN char pseps[2] = INIT(= {'\\' COMMA 0});
13631360
#endif
13641361

13651362
#ifdef FEAT_VIRTUALEDIT

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,8 @@ static char *(features[]) =
758758

759759
static int included_patches[] =
760760
{ /* Add new patch number below this line */
761+
/**/
762+
2106,
761763
/**/
762764
2105,
763765
/**/

src/vim.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,6 +1765,7 @@ int vim_memcmp(void *, void *, size_t);
17651765
# ifndef INIT
17661766
# define INIT(x) x
17671767
# define DO_INIT
1768+
# define COMMA ,
17681769
# endif
17691770
#endif
17701771

0 commit comments

Comments
 (0)