0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.0254: compiler warning for checking size_t to be negative

Problem:    Compiler warning for checking size_t to be negative.
Solution:   Only check for zero. (Zoltan Arpadffy)
This commit is contained in:
Bram Moolenaar
2020-02-13 21:42:24 +01:00
parent 21456cdccb
commit ae8d2de3a9
2 changed files with 4 additions and 2 deletions

View File

@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
254,
/**/ /**/
253, 253,
/**/ /**/

View File

@@ -138,7 +138,7 @@ lookup_local(char_u *name, size_t len, cctx_T *cctx)
{ {
int idx; int idx;
if (len <= 0) if (len == 0)
return -1; return -1;
for (idx = 0; idx < cctx->ctx_locals.ga_len; ++idx) for (idx = 0; idx < cctx->ctx_locals.ga_len; ++idx)
{ {
@@ -160,7 +160,7 @@ lookup_arg(char_u *name, size_t len, cctx_T *cctx)
{ {
int idx; int idx;
if (len <= 0) if (len == 0)
return -1; return -1;
for (idx = 0; idx < cctx->ctx_ufunc->uf_args.ga_len; ++idx) for (idx = 0; idx < cctx->ctx_ufunc->uf_args.ga_len; ++idx)
{ {