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/userfunc.c b/src/userfunc.c
index c3b2a25..2575e7d 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -36,7 +36,7 @@
static void handle_defer_one(funccall_T *funccal);
void
-func_init()
+func_init(void)
{
hash_init(&func_hashtab);
}
@@ -2709,7 +2709,7 @@
* current_funccal.
*/
void
-remove_funccal()
+remove_funccal(void)
{
funccall_T *fc = current_funccal;
@@ -6662,7 +6662,7 @@
* Return NULL if there is no current funccal.
*/
hashtab_T *
-get_funccal_local_ht()
+get_funccal_local_ht(void)
{
if (current_funccal == NULL || current_funccal->fc_l_vars.dv_refcount == 0)
return NULL;
@@ -6674,7 +6674,7 @@
* Return NULL if there is no current funccal.
*/
dictitem_T *
-get_funccal_local_var()
+get_funccal_local_var(void)
{
if (current_funccal == NULL || current_funccal->fc_l_vars.dv_refcount == 0)
return NULL;
@@ -6686,7 +6686,7 @@
* Return NULL if there is no current funccal.
*/
hashtab_T *
-get_funccal_args_ht()
+get_funccal_args_ht(void)
{
if (current_funccal == NULL || current_funccal->fc_l_vars.dv_refcount == 0)
return NULL;
@@ -6698,7 +6698,7 @@
* Return NULL if there is no current funccal.
*/
dictitem_T *
-get_funccal_args_var()
+get_funccal_args_var(void)
{
if (current_funccal == NULL || current_funccal->fc_l_vars.dv_refcount == 0)
return NULL;