*: Fix linter errors

This commit is contained in:
ZyX 2017-02-23 01:38:54 +03:00
parent 858ac9d8e5
commit 9c1865c7f8
5 changed files with 8 additions and 11 deletions

View File

@ -3157,12 +3157,13 @@ static void item_lock(typval_T *tv, int deep, int lock)
list_T *const l = tv->vval.v_list; list_T *const l = tv->vval.v_list;
if (l != NULL) { if (l != NULL) {
CHANGE_LOCK(l->lv_lock, lock); CHANGE_LOCK(l->lv_lock, lock);
if (deep < 0 || deep > 1) if (deep < 0 || deep > 1) {
// Recursive: lock/unlock the items the List contains. // Recursive: lock/unlock the items the List contains.
for (listitem_T *li = l->lv_first; li != NULL; li = li->li_next) { for (listitem_T *li = l->lv_first; li != NULL; li = li->li_next) {
item_lock(&li->li_tv, deep - 1, lock); item_lock(&li->li_tv, deep - 1, lock);
} }
} }
}
break; break;
} }
case VAR_DICT: { case VAR_DICT: {
@ -12396,7 +12397,7 @@ static void f_insert(typval_T *argvars, typval_T *rettv, FunPtr fptr)
long before = 0; long before = 0;
listitem_T *item; listitem_T *item;
list_T *l; list_T *l;
int error = FALSE; int error = false;
const char *const arg_errmsg = _("insert() argument"); const char *const arg_errmsg = _("insert() argument");
const size_t arg_errmsg_len = strlen(arg_errmsg); const size_t arg_errmsg_len = strlen(arg_errmsg);
@ -12454,7 +12455,7 @@ static void f_islocked(typval_T *argvars, typval_T *rettv, FunPtr fptr)
dictitem_T *di; dictitem_T *di;
rettv->vval.v_number = -1; rettv->vval.v_number = -1;
end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, FALSE, FALSE, end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, false, false,
GLV_NO_AUTOLOAD|GLV_READ_ONLY, FNE_CHECK_START); GLV_NO_AUTOLOAD|GLV_READ_ONLY, FNE_CHECK_START);
if (end != NULL && lv.ll_name != NULL) { if (end != NULL && lv.ll_name != NULL) {
if (*end != NUL) if (*end != NUL)

View File

@ -576,7 +576,7 @@ void getout(int exitval)
buf_T *buf = wp->w_buffer; buf_T *buf = wp->w_buffer;
if (buf->b_changedtick != -1) { if (buf->b_changedtick != -1) {
apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname,
buf->b_fname, FALSE, buf); buf->b_fname, false, buf);
buf_set_changedtick(buf, -1); // note that we did it already buf_set_changedtick(buf, -1); // note that we did it already
// start all over, autocommands may mess up the lists // start all over, autocommands may mess up the lists
next_tp = first_tabpage; next_tp = first_tabpage;

View File

@ -4,7 +4,6 @@ local curbuf, curwin, eq = helpers.curbuf, helpers.curwin, helpers.eq
local curbufmeths, ok = helpers.curbufmeths, helpers.ok local curbufmeths, ok = helpers.curbufmeths, helpers.ok
local funcs = helpers.funcs local funcs = helpers.funcs
local request = helpers.request local request = helpers.request
local neq = helpers.neq
local NIL = helpers.NIL local NIL = helpers.NIL
local meth_pcall = helpers.meth_pcall local meth_pcall = helpers.meth_pcall
local command = helpers.command local command = helpers.command

View File

@ -1,7 +1,6 @@
local helpers = require('test.functional.helpers')(after_each) local helpers = require('test.functional.helpers')(after_each)
local eq = helpers.eq local eq = helpers.eq
local neq = helpers.neq
local eval = helpers.eval local eval = helpers.eval
local feed = helpers.feed local feed = helpers.feed
local clear = helpers.clear local clear = helpers.clear
@ -15,8 +14,6 @@ local curbufmeths = helpers.curbufmeths
before_each(clear) before_each(clear)
local function preinc(t, v) t.value = t.value + (v or 1) return t.value end
local function changedtick() local function changedtick()
local ct = curbufmeths.get_changedtick() local ct = curbufmeths.get_changedtick()
eq(ct, curbufmeths.get_var('changedtick')) eq(ct, curbufmeths.get_var('changedtick'))