• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revision5b6f420e7352d151692eaff103ee6068f021936a (tree)
Time2020-02-14 05:45:03
AuthorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

patch 8.2.0254: compiler warning for checking size_t to be negative

Commit: https://github.com/vim/vim/commit/ae8d2de3a9c0436a543c7d46071104af31ff6db7
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Feb 13 21:42:24 2020 +0100

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)

Change Summary

Incremental Difference

diff -r fddabbb2fbd3 -r 5b6f420e7352 src/version.c
--- a/src/version.c Thu Feb 13 21:30:10 2020 +0100
+++ b/src/version.c Thu Feb 13 21:45:03 2020 +0100
@@ -743,6 +743,8 @@
743743 static int included_patches[] =
744744 { /* Add new patch number below this line */
745745 /**/
746+ 254,
747+/**/
746748 253,
747749 /**/
748750 252,
diff -r fddabbb2fbd3 -r 5b6f420e7352 src/vim9compile.c
--- a/src/vim9compile.c Thu Feb 13 21:30:10 2020 +0100
+++ b/src/vim9compile.c Thu Feb 13 21:45:03 2020 +0100
@@ -138,7 +138,7 @@
138138 {
139139 int idx;
140140
141- if (len <= 0)
141+ if (len == 0)
142142 return -1;
143143 for (idx = 0; idx < cctx->ctx_locals.ga_len; ++idx)
144144 {
@@ -160,7 +160,7 @@
160160 {
161161 int idx;
162162
163- if (len <= 0)
163+ if (len == 0)
164164 return -1;
165165 for (idx = 0; idx < cctx->ctx_ufunc->uf_args.ga_len; ++idx)
166166 {
Show on old repository browser