diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-10-21 23:48:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-21 23:48:43 +0200 |
commit | 565bbd1485a4c884dbfdb65b8b1c04a0c5da6b3e (patch) | |
tree | 59350b8f5cc04debb154711181138880338a42d8 /src | |
parent | 25bc65698860b8713ef83e32015c0fd43247ebb4 (diff) | |
parent | 11ae6f418d6c8b62ea328e90a0ada3aff1ab9979 (diff) | |
download | rneovim-565bbd1485a4c884dbfdb65b8b1c04a0c5da6b3e.tar.gz rneovim-565bbd1485a4c884dbfdb65b8b1c04a0c5da6b3e.tar.bz2 rneovim-565bbd1485a4c884dbfdb65b8b1c04a0c5da6b3e.zip |
Merge #9146 from justinmk/fix-warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 5 | ||||
-rw-r--r-- | src/nvim/eval/typval_encode.c.h | 1 | ||||
-rw-r--r-- | src/nvim/ex_cmds.c | 2 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 1 | ||||
-rw-r--r-- | src/nvim/message.c | 8 | ||||
-rw-r--r-- | src/nvim/quickfix.c | 1 | ||||
-rw-r--r-- | src/nvim/screen.c | 10 |
7 files changed, 17 insertions, 11 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 515dd0e69f..052e0e3f35 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -16461,6 +16461,7 @@ static void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv, bool retlist) { proftime_T wait_time; + bool profiling = do_profiling == PROF_YES; rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; @@ -16497,7 +16498,7 @@ static void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv, xfree(cmdstr); } - if (do_profiling == PROF_YES) { + if (profiling) { prof_child_enter(&wait_time); } @@ -16506,7 +16507,7 @@ static void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv, char *res = NULL; int status = os_system(argv, input, input_len, &res, &nread); - if (do_profiling == PROF_YES) { + if (profiling) { prof_child_exit(&wait_time); } diff --git a/src/nvim/eval/typval_encode.c.h b/src/nvim/eval/typval_encode.c.h index 4556ce8193..623bdfc93b 100644 --- a/src/nvim/eval/typval_encode.c.h +++ b/src/nvim/eval/typval_encode.c.h @@ -741,6 +741,7 @@ typval_encode_stop_converting_one_item: case kMPConvPartial: { partial_T *const pt = cur_mpsv->data.p.pt; tv = cur_mpsv->tv; + (void)tv; switch (cur_mpsv->data.p.stage) { case kMPConvPartialArgs: { TYPVAL_ENCODE_CONV_FUNC_BEFORE_ARGS(tv, diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index bce0c35f67..99f8963dad 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -3299,7 +3299,7 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout, endcolumn = (curwin->w_curswant == MAXCOL); } - if (sub_joining_lines(eap, pat, sub, cmd, !preview)) { + if (sub != NULL && sub_joining_lines(eap, pat, sub, cmd, !preview)) { return NULL; } diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 2a733f5831..5533c57adb 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -10048,6 +10048,7 @@ bool cmd_can_preview(char_u *cmd) } exarg_T ea; + memset(&ea, 0, sizeof(ea)); // parse the command line ea.cmd = skip_range(cmd, NULL); if (*ea.cmd == '*') { diff --git a/src/nvim/message.c b/src/nvim/message.c index 1778e0048f..5dafde5bd1 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -1475,11 +1475,13 @@ void msg_prt_line(char_u *s, int list) while (!got_int) { if (n_extra > 0) { - --n_extra; - if (c_extra) + n_extra--; + if (c_extra) { c = c_extra; - else + } else { + assert(p_extra != NULL); c = *p_extra++; + } } else if ((l = utfc_ptr2len(s)) > 1) { col += utf_ptr2cells(s); char buf[MB_MAXBYTES + 1]; diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 89e0f40f4e..51a7dd670f 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -4492,6 +4492,7 @@ static int qf_set_properties(qf_info_T *qi, dict_T *what, int action, } if ((di = tv_dict_find(what, S_LEN("items"))) != NULL) { if (di->di_tv.v_type == VAR_LIST) { + assert(qi->qf_lists[qf_idx].qf_title != NULL); char_u *title_save = vim_strsave(qi->qf_lists[qf_idx].qf_title); retval = qf_add_entries(qi, qf_idx, di->di_tv.vval.v_list, diff --git a/src/nvim/screen.c b/src/nvim/screen.c index f6d162aec2..5033a6dd7f 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2175,11 +2175,11 @@ win_line ( int n_skip = 0; /* nr of chars to skip for 'nowrap' */ - int fromcol, tocol; /* start/end of inverting */ - int fromcol_prev = -2; /* start of inverting after cursor */ - int noinvcur = FALSE; /* don't invert the cursor */ - pos_T *top, *bot; - int lnum_in_visual_area = FALSE; + int fromcol = 0, tocol = 0; // start/end of inverting + int fromcol_prev = -2; // start of inverting after cursor + int noinvcur = false; // don't invert the cursor + pos_T *top, *bot; + int lnum_in_visual_area = false; pos_T pos; long v; |