diff options
author | K.Takata <kentkt@csc.jp> | 2023-08-26 18:05:08 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-08-26 18:05:08 +0200 |
commit | 4c215ecdafbc9a32bca885abc3272be741047291 (patch) | |
tree | 31c4eb6245324932da6625c6cedea22a6b9a7f04 | |
parent | 535b9e12d02f5fef969fb680d579c586bd5f40db (diff) |
patch 9.0.1788: C4090 warnings in strings.cv9.0.1788
Problem: C4090 warnings in strings.c
Solution: Add type casts
closes: #12917
MSVC shows the following warnings:
```
strings.c(2436): warning C4090: 'function': different 'const' qualifiers
strings.c(2774): warning C4090: 'function': different 'const' qualifiers
strings.c(3865): warning C4090: 'function': different 'const' qualifiers
```
So add type casts to suppress them.
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken .Takata <kentkt@csc.jp>
-rw-r--r-- | src/strings.c | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/strings.c b/src/strings.c index 993674406c..d1d82f4822 100644 --- a/src/strings.c +++ b/src/strings.c @@ -2433,7 +2433,8 @@ adjust_types( if (*ap_types == NULL) new_types = ALLOC_CLEAR_MULT(const char *, arg); else - new_types = vim_realloc(*ap_types, arg * sizeof(const char *)); + new_types = vim_realloc((char **)*ap_types, + arg * sizeof(const char *)); if (new_types == NULL) return FAIL; @@ -2771,7 +2772,7 @@ parse_fmt_types( return OK; error: - vim_free(*ap_types); + vim_free((char**)*ap_types); *ap_types = NULL; *num_posarg = 0; return FAIL; @@ -3862,7 +3863,7 @@ vim_vsnprintf_typval( if (tvs != NULL && tvs[num_posarg != 0 ? num_posarg : arg_idx - 1].v_type != VAR_UNKNOWN) emsg(_(e_too_many_arguments_to_printf)); - vim_free(ap_types); + vim_free((char*)ap_types); va_end(ap); // Return the number of characters formatted (excluding trailing nul diff --git a/src/version.c b/src/version.c index eb65fc1f29..d6e259c014 100644 --- a/src/version.c +++ b/src/version.c @@ -700,6 +700,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1788, +/**/ 1787, /**/ 1786, |