summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-13 21:42:24 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-13 21:42:24 +0100
commitae8d2de3a9c0436a543c7d46071104af31ff6db7 (patch)
treecabb0bc8247d245bcdb139281a10a9ad5f682e55
parent21456cdccbdf9d222938139769f1abe95b8effdd (diff)
patch 8.2.0254: compiler warning for checking size_t to be negativev8.2.0254
Problem: Compiler warning for checking size_t to be negative. Solution: Only check for zero. (Zoltan Arpadffy)
-rw-r--r--src/version.c2
-rw-r--r--src/vim9compile.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/version.c b/src/version.c
index 0499e5da19..dc3d1634f0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -743,6 +743,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 254,
+/**/
253,
/**/
252,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index c6201be900..4413a514da 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -138,7 +138,7 @@ lookup_local(char_u *name, size_t len, cctx_T *cctx)
{
int idx;
- if (len <= 0)
+ if (len == 0)
return -1;
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;
- if (len <= 0)
+ if (len == 0)
return -1;
for (idx = 0; idx < cctx->ctx_ufunc->uf_args.ga_len; ++idx)
{