Mercurial > vim
diff src/normal.c @ 32009:4545f58c8490 v9.0.1336
patch 9.0.1336: functions without arguments are not always declared properly
Commit: https://github.com/vim/vim/commit/a23a11b5bf03454b71fdb5deac0d5f641e222160
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Feb 21 14:27:41 2023 +0000
patch 9.0.1336: functions without arguments are not always declared properly
Problem: Functions without arguments are not always declared properly.
Solution: Use "(void)" instead of "()". (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/12031)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 21 Feb 2023 15:30:08 +0100 |
parents | 479c93ad4a3b |
children | 55926b4f2246 |
line wrap: on
line diff
--- a/src/normal.c +++ b/src/normal.c @@ -976,14 +976,14 @@ normal_end: // Reset finish_op, in case it was set #ifdef CURSOR_SHAPE - c = finish_op; + int prev_finish_op = finish_op; #endif finish_op = FALSE; may_trigger_modechanged(); #ifdef CURSOR_SHAPE // Redraw the cursor with another shape, if we were in Operator-pending // mode or did a replace command. - if (c || ca.cmdchar == 'r') + if (prev_finish_op || ca.cmdchar == 'r') { ui_cursor_shape(); // may show different cursor shape # ifdef FEAT_MOUSESHAPE @@ -1110,14 +1110,14 @@ call_yank_do_autocmd(int regname) * from do_pending_operator(). */ void -end_visual_mode() +end_visual_mode(void) { end_visual_mode_keep_button(); reset_held_button(); } void -end_visual_mode_keep_button() +end_visual_mode_keep_button(void) { #ifdef FEAT_CLIPBOARD // If we are using the clipboard, then remember what was selected in case @@ -3190,7 +3190,7 @@ nv_colon(cmdarg_T *cap) else if (cap->oap->op_type != OP_NOP && (cap->oap->start.lnum > curbuf->b_ml.ml_line_count || cap->oap->start.col > - (colnr_T)STRLEN(ml_get(cap->oap->start.lnum)) + (colnr_T)STRLEN(ml_get(cap->oap->start.lnum)) || did_emsg )) // The start of the operator has become invalid by the Ex command.