mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
*: Fix preincrement lint errors
This commit is contained in:
parent
45304b482c
commit
28275fe5c3
@ -478,7 +478,7 @@ void eval_init(void)
|
|||||||
hash_init(&compat_hashtab);
|
hash_init(&compat_hashtab);
|
||||||
hash_init(&func_hashtab);
|
hash_init(&func_hashtab);
|
||||||
|
|
||||||
for (size_t i = 0; i < ARRAY_SIZE(vimvars); ++i) {
|
for (size_t i = 0; i < ARRAY_SIZE(vimvars); i++) {
|
||||||
p = &vimvars[i];
|
p = &vimvars[i];
|
||||||
STRCPY(p->vv_di.di_key, p->vv_name);
|
STRCPY(p->vv_di.di_key, p->vv_name);
|
||||||
if (p->vv_flags & VV_RO)
|
if (p->vv_flags & VV_RO)
|
||||||
@ -537,7 +537,7 @@ void eval_clear(void)
|
|||||||
{
|
{
|
||||||
struct vimvar *p;
|
struct vimvar *p;
|
||||||
|
|
||||||
for (size_t i = 0; i < ARRAY_SIZE(vimvars); ++i) {
|
for (size_t i = 0; i < ARRAY_SIZE(vimvars); i++) {
|
||||||
p = &vimvars[i];
|
p = &vimvars[i];
|
||||||
if (p->vv_di.di_tv.v_type == VAR_STRING) {
|
if (p->vv_di.di_tv.v_type == VAR_STRING) {
|
||||||
xfree(p->vv_str);
|
xfree(p->vv_str);
|
||||||
@ -20069,10 +20069,10 @@ call_user_func (
|
|||||||
msg_outnum((long)argvars[i].vval.v_number);
|
msg_outnum((long)argvars[i].vval.v_number);
|
||||||
} else {
|
} else {
|
||||||
// Do not want errors such as E724 here.
|
// Do not want errors such as E724 here.
|
||||||
++emsg_off;
|
emsg_off++;
|
||||||
char_u *s = (char_u *) encode_tv2string(&argvars[i], NULL);
|
char_u *s = (char_u *) encode_tv2string(&argvars[i], NULL);
|
||||||
char_u *tofree = s;
|
char_u *tofree = s;
|
||||||
--emsg_off;
|
emsg_off--;
|
||||||
if (s != NULL) {
|
if (s != NULL) {
|
||||||
if (vim_strsize(s) > MSG_BUF_CLEN) {
|
if (vim_strsize(s) > MSG_BUF_CLEN) {
|
||||||
trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
|
trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
|
||||||
@ -20163,10 +20163,10 @@ call_user_func (
|
|||||||
// The value may be very long. Skip the middle part, so that we
|
// The value may be very long. Skip the middle part, so that we
|
||||||
// have some idea how it starts and ends. smsg() would always
|
// have some idea how it starts and ends. smsg() would always
|
||||||
// truncate it at the end. Don't want errors such as E724 here.
|
// truncate it at the end. Don't want errors such as E724 here.
|
||||||
++emsg_off;
|
emsg_off++;
|
||||||
char_u *s = (char_u *) encode_tv2string(fc->rettv, NULL);
|
char_u *s = (char_u *) encode_tv2string(fc->rettv, NULL);
|
||||||
char_u *tofree = s;
|
char_u *tofree = s;
|
||||||
--emsg_off;
|
emsg_off--;
|
||||||
if (s != NULL) {
|
if (s != NULL) {
|
||||||
if (vim_strsize(s) > MSG_BUF_CLEN) {
|
if (vim_strsize(s) > MSG_BUF_CLEN) {
|
||||||
trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
|
trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
|
||||||
|
@ -4816,11 +4816,11 @@ buf_check_timestamp (
|
|||||||
busy = true;
|
busy = true;
|
||||||
set_vim_var_string(VV_FCS_REASON, reason, -1);
|
set_vim_var_string(VV_FCS_REASON, reason, -1);
|
||||||
set_vim_var_string(VV_FCS_CHOICE, "", -1);
|
set_vim_var_string(VV_FCS_CHOICE, "", -1);
|
||||||
++allbuf_lock;
|
allbuf_lock++;
|
||||||
n = apply_autocmds(EVENT_FILECHANGEDSHELL,
|
n = apply_autocmds(EVENT_FILECHANGEDSHELL,
|
||||||
buf->b_fname, buf->b_fname, FALSE, buf);
|
buf->b_fname, buf->b_fname, false, buf);
|
||||||
--allbuf_lock;
|
allbuf_lock--;
|
||||||
busy = FALSE;
|
busy = false;
|
||||||
if (n) {
|
if (n) {
|
||||||
if (!buf_valid(buf))
|
if (!buf_valid(buf))
|
||||||
EMSG(_("E246: FileChangedShell autocommand deleted buffer"));
|
EMSG(_("E246: FileChangedShell autocommand deleted buffer"));
|
||||||
|
Loading…
Reference in New Issue
Block a user