Mirror of the Vim source from https://github.com/vim/vim
修订版 | 53216e87f21ccf9e08ddbc5d60a4a5734dde559f (tree) |
---|---|
时间 | 2021-04-15 04:45:03 |
作者 | Bram Moolenaar <Bram@vim....> |
Commiter | Bram Moolenaar |
patch 8.2.2767: compiler warning for unused argument
Commit: https://github.com/vim/vim/commit/bd6406f15db210b78fa24dece3bd021a7ac085dc
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 14 21:30:06 2021 +0200
@@ -340,7 +340,7 @@ | ||
340 | 340 | * Check if "n1"- is a valid index for a blobl with length "bloblen". |
341 | 341 | */ |
342 | 342 | int |
343 | -check_blob_index(long bloblen, varnumber_T n1, int is_range, int quiet) | |
343 | +check_blob_index(long bloblen, varnumber_T n1, int quiet) | |
344 | 344 | { |
345 | 345 | if (n1 < 0 || n1 > bloblen) |
346 | 346 | { |
@@ -1175,8 +1175,7 @@ | ||
1175 | 1175 | lp->ll_n1 = (long)tv_get_number(&var1); |
1176 | 1176 | clear_tv(&var1); |
1177 | 1177 | |
1178 | - if (check_blob_index(bloblen, lp->ll_n1, lp->ll_range, quiet) | |
1179 | - == FAIL) | |
1178 | + if (check_blob_index(bloblen, lp->ll_n1, quiet) == FAIL) | |
1180 | 1179 | { |
1181 | 1180 | clear_tv(&var2); |
1182 | 1181 | return NULL; |
@@ -14,7 +14,7 @@ | ||
14 | 14 | char_u *blob2string(blob_T *blob, char_u **tofree, char_u *numbuf); |
15 | 15 | blob_T *string2blob(char_u *str); |
16 | 16 | int blob_slice_or_index(blob_T *blob, int is_range, varnumber_T n1, varnumber_T n2, int exclusive, typval_T *rettv); |
17 | -int check_blob_index(long bloblen, varnumber_T n1, int is_range, int quiet); | |
17 | +int check_blob_index(long bloblen, varnumber_T n1, int quiet); | |
18 | 18 | int check_blob_range(long bloblen, varnumber_T n1, varnumber_T n2, int quiet); |
19 | 19 | int blob_set_range(blob_T *dest, long n1, long n2, typval_T *src); |
20 | 20 | void blob_remove(typval_T *argvars, typval_T *rettv); |
@@ -751,6 +751,8 @@ | ||
751 | 751 | static int included_patches[] = |
752 | 752 | { /* Add new patch number below this line */ |
753 | 753 | /**/ |
754 | + 2767, | |
755 | +/**/ | |
754 | 756 | 2766, |
755 | 757 | /**/ |
756 | 758 | 2765, |
@@ -2282,7 +2282,7 @@ | ||
2282 | 2282 | long bloblen = blob_len(tv_dest->vval.v_blob); |
2283 | 2283 | |
2284 | 2284 | if (check_blob_index(bloblen, |
2285 | - n1, TRUE, FALSE) == FAIL | |
2285 | + n1, FALSE) == FAIL | |
2286 | 2286 | || check_blob_range(bloblen, |
2287 | 2287 | n1, n2, FALSE) == FAIL) |
2288 | 2288 | status = FAIL; |