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 #12031)
diff --git a/src/normal.c b/src/normal.c
index 1ab1599..b3ea5e8 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -976,14 +976,14 @@
// 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 @@
* 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 @@
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.