]> granicus.if.org Git - vim/commitdiff
patch 8.2.0254: compiler warning for checking size_t to be negative v8.2.0254
authorBram Moolenaar <Bram@vim.org>
Thu, 13 Feb 2020 20:42:24 +0000 (21:42 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Feb 2020 20:42:24 +0000 (21:42 +0100)
Problem:    Compiler warning for checking size_t to be negative.
Solution:   Only check for zero. (Zoltan Arpadffy)

src/version.c
src/vim9compile.c

index 0499e5da19ea0e9f4f89b85e414f1b06c2b7ea70..dc3d1634f0881b9e9615b2dfaa6c500052c083c0 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    254,
 /**/
     253,
 /**/
index c6201be900b4783e2c8f319e1d9bc12d263e8431..4413a514dacbf18f01642b534eb3358e14f03244 100644 (file)
@@ -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)
     {