diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-06 21:53:17 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-06 21:53:17 +0200 |
commit | cbb6bdcd8967edc8ad123746d27ec30ccc7c1718 (patch) | |
tree | 63e35c7653975ac881c405f45f9aede6628a51ab | |
parent | 27321dbeedf8bb833c48b01bf18536125794f65e (diff) |
patch 8.2.1148: warning for using int instead of size_tv8.2.1148
Problem: Warning for using int instead of size_t.
Solution: Change "len" argument to size_t. (Mike Williams)
-rw-r--r-- | src/proto/vim9compile.pro | 2 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9compile.c | 2 | ||||
-rw-r--r-- | src/vim9script.c | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/src/proto/vim9compile.pro b/src/proto/vim9compile.pro index 040e4d7eb7..05f6d50220 100644 --- a/src/proto/vim9compile.pro +++ b/src/proto/vim9compile.pro @@ -1,5 +1,5 @@ /* vim9compile.c */ -int check_defined(char_u *p, int len, cctx_T *cctx); +int check_defined(char_u *p, size_t len, cctx_T *cctx); type_T *typval2type(typval_T *tv); int check_type(type_T *expected, type_T *actual, int give_msg); char_u *skip_type(char_u *start); diff --git a/src/version.c b/src/version.c index ec1e12e0b0..867eaf55f2 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1148, +/**/ 1147, /**/ 1146, diff --git a/src/vim9compile.c b/src/vim9compile.c index db24eaead6..c876da0751 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -288,7 +288,7 @@ lookup_script(char_u *name, size_t len) * Return FAIL and give an error if it defined. */ int -check_defined(char_u *p, int len, cctx_T *cctx) +check_defined(char_u *p, size_t len, cctx_T *cctx) { if (lookup_script(p, len) == OK || (cctx != NULL diff --git a/src/vim9script.c b/src/vim9script.c index ef447c7e35..77fe6b074a 100644 --- a/src/vim9script.c +++ b/src/vim9script.c @@ -324,7 +324,7 @@ handle_import( if (eval_isnamec1(*arg)) while (eval_isnamec(*arg)) ++arg; - if (check_defined(p, (int)(arg - p), cctx) == FAIL) + if (check_defined(p, arg - p, cctx) == FAIL) goto erret; as_name = vim_strnsave(p, arg - p); arg = skipwhite_and_linebreak(arg, evalarg); |