Skip to content

Commit a23a11b

Browse files
yegappanbrammool
authored andcommitted
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)
1 parent d950984 commit a23a11b

34 files changed

+75
-72
lines changed

src/channel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4180,7 +4180,7 @@ channel_handle_events(int only_keep_open)
41804180
* Return TRUE when there is any channel with a keep_open flag.
41814181
*/
41824182
int
4183-
channel_any_keep_open()
4183+
channel_any_keep_open(void)
41844184
{
41854185
channel_T *channel;
41864186

src/charset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,7 @@ skipwhite_and_nl(char_u *q)
17641764
* columns (bytes) at the start of a given line
17651765
*/
17661766
int
1767-
getwhitecols_curline()
1767+
getwhitecols_curline(void)
17681768
{
17691769
return getwhitecols(ml_get_curline());
17701770
}

src/clipboard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ start_global_changes(void)
257257
* right text.
258258
*/
259259
static int
260-
is_clipboard_needs_update()
260+
is_clipboard_needs_update(void)
261261
{
262262
return clipboard_needs_update;
263263
}

src/crypt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static cryptmethod_T cryptmethods[CRYPT_M_COUNT] = {
155155
// to avoid that a text file is recognized as encrypted.
156156
};
157157

158-
#ifdef FEAT_SODIUM
158+
#if defined(FEAT_SODIUM) || defined(PROTO)
159159
typedef struct {
160160
size_t count;
161161
unsigned char key[crypto_box_SEEDBYTES];
@@ -396,7 +396,7 @@ crypt_get_header_len(int method_nr)
396396
* Get maximum crypt method specific length of the file header in bytes.
397397
*/
398398
int
399-
crypt_get_max_header_len()
399+
crypt_get_max_header_len(void)
400400
{
401401
int i;
402402
int max = 0;

src/debugger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ ex_debuggreedy(exarg_T *eap)
734734
}
735735

736736
static void
737-
update_has_expr_breakpoint()
737+
update_has_expr_breakpoint(void)
738738
{
739739
int i;
740740

@@ -751,7 +751,7 @@ update_has_expr_breakpoint()
751751
* Return TRUE if there is any expression breakpoint.
752752
*/
753753
int
754-
debug_has_expr_breakpoint()
754+
debug_has_expr_breakpoint(void)
755755
{
756756
return has_expr_breakpoint;
757757
}

src/edit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4607,7 +4607,7 @@ ins_end(int c)
46074607
}
46084608

46094609
static void
4610-
ins_s_left()
4610+
ins_s_left(void)
46114611
{
46124612
int end_change = dont_sync_undo == FALSE; // end undoable change
46134613
#ifdef FEAT_FOLDING
@@ -4676,7 +4676,7 @@ ins_right(void)
46764676
}
46774677

46784678
static void
4679-
ins_s_right()
4679+
ins_s_right(void)
46804680
{
46814681
int end_change = dont_sync_undo == FALSE; // end undoable change
46824682
#ifdef FEAT_FOLDING

src/ex_docmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ do_cmdline(
13861386
* Handle when "did_throw" is set after executing commands.
13871387
*/
13881388
void
1389-
handle_did_throw()
1389+
handle_did_throw(void)
13901390
{
13911391
char *p = NULL;
13921392
msglist_T *messages = NULL;

src/gui_gtk_x11.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ alloc_resize_hist(int width, int height)
463463
* This list is empty when there are no outstanding resize requests.
464464
*/
465465
static void
466-
clear_resize_hists()
466+
clear_resize_hists(void)
467467
{
468468
# ifdef ENABLE_RESIZE_HISTORY_LOG
469469
int i = 0;
@@ -516,7 +516,7 @@ match_stale_width_height(int width, int height)
516516

517517
# if defined(EXITFREE)
518518
static void
519-
free_all_resize_hist()
519+
free_all_resize_hist(void)
520520
{
521521
clear_resize_hists();
522522
vim_free(latest_resize_hist);

src/gui_xim.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ im_preedit_window_set_position(void)
295295
}
296296

297297
static void
298-
im_preedit_window_open()
298+
im_preedit_window_open(void)
299299
{
300300
char *preedit_string;
301301
#if !GTK_CHECK_VERSION(3,16,0)
@@ -417,14 +417,14 @@ im_preedit_window_open()
417417
}
418418

419419
static void
420-
im_preedit_window_close()
420+
im_preedit_window_close(void)
421421
{
422422
if (preedit_window != NULL)
423423
gtk_widget_hide(preedit_window);
424424
}
425425

426426
static void
427-
im_show_preedit()
427+
im_show_preedit(void)
428428
{
429429
im_preedit_window_open();
430430

src/highlight.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ init_highlight(
469469
* the user to override the color values. Only loaded once.
470470
*/
471471
static void
472-
load_default_colors_lists()
472+
load_default_colors_lists(void)
473473
{
474474
// Lacking a default color list isn't the end of the world but it is likely
475475
// an inconvenience so users should know when it is missing.

0 commit comments

Comments
 (0)