vim-patch:8.0.1723: using one item array size declaration is misleading

Problem:    Using one item array size declaration is misleading.
Solution:   Instead of using "[1]" and actually using a larger array, use
            "[]".  This is to verify that this C99 feature works for all
            compilers.
f3a411783c

The following patch is N/A because Neovim requires C99.
vim-patch:8.0.1735: flexible array member feature not supported by HP-UX
This commit is contained in:
Jan Edmund Lazo
2019-06-16 18:58:07 -04:00
parent 352d5a9713
commit 315076a26d
2 changed files with 53 additions and 44 deletions

View File

@@ -133,14 +133,14 @@ typedef struct buffheader buffheader_T;
*/
struct buffblock {
buffblock_T *b_next; // pointer to next buffblock
char_u b_str[1]; // contents (actually longer)
char_u b_str[]; // contents (flexible array)
};
/*
* header used for the stuff buffer and the redo buffer
*/
struct buffheader {
buffblock_T bh_first; // first (dummy) block of list
buffblock_T *bh_first; // first block of the list
buffblock_T *bh_curr; // buffblock for appending
size_t bh_index; // index for reading
size_t bh_space; // space in bh_curr for appending