diff options
-rw-r--r-- | src/nvim/spell.c | 8 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 7119ac6dc1..7e0bbd6ad1 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -292,6 +292,9 @@ #include <stdlib.h> #include <wctype.h> +/* for offsetof() */ +#include <stddef.h> + #include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/spell.h" @@ -583,9 +586,8 @@ typedef struct wordcount_S { char_u wc_word[1]; // word, actually longer } wordcount_T; -static wordcount_T dumwc; -#define WC_KEY_OFF (unsigned)(dumwc.wc_word - (char_u *)&dumwc) -#define HI2WC(hi) ((wordcount_T *)((hi)->hi_key - WC_KEY_OFF)) +#define WC_KEY_OFF offsetof(wordcount_T, wc_word) +#define HI2WC(hi) ((wordcount_T *)((hi)->hi_key - WC_KEY_OFF)) #define MAXWORDCOUNT 0xffff // Information used when looking for suggestions. diff --git a/src/nvim/version.c b/src/nvim/version.c index 93dd72f7fa..3dfc32fc6d 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -378,7 +378,7 @@ static int included_patches[] = { 2065, // 2064, // 2063 NA - // 2062, + 2062, // 2061, // 2060 NA // 2059 NA |