Skip to content

Commit efd97fd

Browse files
authored
Merge pull request #1435 from ychin/fix-strict-and-missing-prototypes-warnings
Fix warning build failures, fix README GitHub Action badge
2 parents c88f768 + 930933f commit efd97fd

File tree

12 files changed

+39
-39
lines changed

12 files changed

+39
-39
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Vim - the text editor - for macOS
77

88
- Vim README: [README_vim.md](README_vim.md)
99

10-
- [![MacVim GitHub CI](https://github.com/macvim-dev/macvim/workflows/MacVim%20GitHub%20CI/badge.svg)](https://github.com/macvim-dev/macvim/actions?query=workflow%3A%22MacVim+GitHub+CI%22)
10+
- [![MacVim GitHub CI](https://github.com/macvim-dev/macvim/actions/workflows/ci-macvim.yaml/badge.svg)](https://github.com/macvim-dev/macvim/actions/workflows/ci-macvim.yaml)
1111

1212
- Packaged in [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/macvim.svg)](https://repology.org/metapackage/macvim/versions) [![MacPorts package](https://repology.org/badge/version-for-repo/macports/macvim.svg)](https://repology.org/metapackage/macvim/versions)
1313

src/MacVim/MMBackend.m

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929

3030
#import "MMBackend.h"
31+
#include "gui_macvim.pro"
3132

3233

3334

@@ -56,11 +57,6 @@
5657

5758
static id evalExprCocoa(NSString * expr, NSString ** errstr);
5859

59-
void im_preedit_start_macvim();
60-
void im_preedit_end_macvim();
61-
void im_preedit_abandon_macvim();
62-
void im_preedit_changed_macvim(char *preedit_string, int cursor_index);
63-
6460
enum {
6561
MMBlinkStateNone = 0,
6662
MMBlinkStateOn,
@@ -149,9 +145,6 @@
149145
};
150146

151147

152-
extern GuiFont gui_mch_retain_font(GuiFont font);
153-
154-
155148
@interface NSString (MMServerNameCompare)
156149
- (NSComparisonResult)serverNameCompare:(NSString *)string;
157150
@end
@@ -1375,7 +1368,7 @@ - (NSString *)evaluateExpression:(in bycopy NSString *)expr
13751368
/// Extracts the text currently selected in visual mode, and returns it.
13761369
///
13771370
/// @return the string representing the selected text, or NULL if failure.
1378-
static char_u *extractSelectedText()
1371+
static char_u *extractSelectedText(void)
13791372
{
13801373
// Note: Most of the functionality in Vim that allows for extracting useful
13811374
// text from a selection are in the register & clipboard utility functions.

src/MacVim/MacVim.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ extern NSString *VimFindPboardType;
505505

506506
extern int ASLogLevel;
507507

508-
void ASLInit();
508+
void ASLInit(void);
509509

510510
#if defined(MM_USE_ASL)
511511

src/MacVim/MacVim.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ + (id)dictionaryWithData:(NSData *)data
253253

254254

255255
void
256-
ASLInit()
256+
ASLInit(void)
257257
{
258258
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
259259

src/MacVim/gui_macvim.m

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
// -- Initialization --------------------------------------------------------
5050

5151
void
52-
macvim_early_init()
52+
macvim_early_init(void)
5353
{
5454
NSBundle *bundle = [NSBundle mainBundle];
5555
if (bundle) {
@@ -145,7 +145,7 @@
145145

146146
/* Called directly after forking (even if we didn't fork). */
147147
void
148-
gui_macvim_after_fork_init()
148+
gui_macvim_after_fork_init(void)
149149
{
150150
ASLInit();
151151
ASLogDebug(@"");
@@ -606,7 +606,7 @@
606606
* Set default colors.
607607
*/
608608
void
609-
gui_mch_def_colors()
609+
gui_mch_def_colors(void)
610610
{
611611
MMBackend *backend = [MMBackend sharedInstance];
612612

@@ -1385,8 +1385,6 @@
13851385
// -- Input Method ----------------------------------------------------------
13861386

13871387
#if defined(FEAT_EVAL)
1388-
void call_imactivatefunc(int active);
1389-
int call_imstatusfunc(void);
13901388
# ifdef FEAT_GUI
13911389
# define USE_IMACTIVATEFUNC (!gui.in_use && *p_imaf != NUL)
13921390
# define USE_IMSTATUSFUNC (!gui.in_use && *p_imsf != NUL)
@@ -1819,7 +1817,7 @@
18191817
* adding / removing a toolbar) when guioptions 'k' is set.
18201818
*/
18211819
void
1822-
gui_mch_resize_view()
1820+
gui_mch_resize_view(void)
18231821
{
18241822
[[MMBackend sharedInstance] resizeView];
18251823
}
@@ -1892,14 +1890,14 @@
18921890

18931891

18941892
void
1895-
gui_mch_leave_fullscreen()
1893+
gui_mch_leave_fullscreen(void)
18961894
{
18971895
[[MMBackend sharedInstance] leaveFullScreen];
18981896
}
18991897

19001898

19011899
void
1902-
gui_mch_fuopt_update()
1900+
gui_mch_fuopt_update(void)
19031901
{
19041902
if (!gui.in_use)
19051903
return;
@@ -1916,7 +1914,7 @@
19161914

19171915

19181916
void
1919-
gui_macvim_update_modified_flag()
1917+
gui_macvim_update_modified_flag(void)
19201918
{
19211919
[[MMBackend sharedInstance] updateModifiedFlag];
19221920
}
@@ -1983,7 +1981,7 @@
19831981
}
19841982

19851983
void
1986-
gui_macvim_wait_for_startup()
1984+
gui_macvim_wait_for_startup(void)
19871985
{
19881986
MMBackend *backend = [MMBackend sharedInstance];
19891987
if ([backend waitForAck])
@@ -2006,7 +2004,7 @@
20062004
}
20072005

20082006
void *
2009-
gui_macvim_new_autoreleasepool()
2007+
gui_macvim_new_autoreleasepool(void)
20102008
{
20112009
return (void *)[[NSAutoreleasePool alloc] init];
20122010
}

src/ex_cmds2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ browse_save_fname(buf_T *buf)
155155
/*
156156
* "Save changes" dialog that conforms to the Apple HIG.
157157
*/
158-
int
158+
static int
159159
vim_dialog_save_changes(buf_T *buf)
160160
{
161161
char_u buff[IOSIZE];
@@ -181,7 +181,7 @@ vim_dialog_save_changes(buf_T *buf)
181181
* "Save all changes" dialog that tries to emulate the above "Save changes"
182182
* dialog for the case of several modified buffers.
183183
*/
184-
int
184+
static int
185185
vim_dialog_save_all_changes(buf_T *buf)
186186
{
187187
char_u buff[IOSIZE];

src/gui_xim.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ im_commit_cb(GtkIMContext *context UNUSED,
634634
im_preedit_start_cb(GtkIMContext *context UNUSED, gpointer data UNUSED)
635635
# else
636636
void
637-
im_preedit_start_macvim()
637+
im_preedit_start_macvim(void)
638638
# endif
639639
{
640640
#ifdef XIM_DEBUG
@@ -655,7 +655,7 @@ im_preedit_start_macvim()
655655
im_preedit_end_cb(GtkIMContext *context UNUSED, gpointer data UNUSED)
656656
# else
657657
void
658-
im_preedit_end_macvim()
658+
im_preedit_end_macvim(void)
659659
# endif
660660
{
661661
#ifdef XIM_DEBUG
@@ -681,7 +681,7 @@ im_preedit_end_macvim()
681681

682682
#ifdef FEAT_GUI_MACVIM
683683
void
684-
im_preedit_abandon_macvim()
684+
im_preedit_abandon_macvim(void)
685685
{
686686
/* Abandon preedit text, don't send any backspace sequences. */
687687
im_preedit_cursor = 0;

src/os_macosx.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ - (void) sound:(NSSound *)sound didFinishPlaying:(BOOL)flag
524524
#endif
525525

526526
void
527-
macosx_fork()
527+
macosx_fork(void)
528528
{
529529
pid_t pid;
530530
int i;

src/proto.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,4 @@ int clip_mch_own_selection(Clipboard_T *cbd);
344344
void clip_mch_request_selection(Clipboard_T *cbd);
345345
void clip_mch_set_selection(Clipboard_T *cbd);
346346
# endif
347-
# if defined(MACOS_X) && defined(FEAT_GUI)
348-
void macosx_fork();
349-
# endif
350347
#endif // !PROTO && !NOPROTO

src/proto/gui_macvim.pro

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
void macvim_early_init();
1+
void macvim_early_init(void);
22
void gui_mch_prepare(int *argc, char **argv);
3-
void gui_macvim_after_fork_init();
3+
void gui_macvim_after_fork_init(void);
44
int gui_mch_init_check(void);
55
int gui_mch_init(void);
66
void gui_mch_exit(int rc);
@@ -35,6 +35,7 @@ void gui_mch_draw_menubar(void);
3535
void gui_mch_enable_menu(int flag);
3636
void gui_mch_show_toolbar(int showit);
3737
void gui_mch_free_font(GuiFont font);
38+
GuiFont gui_mch_retain_font(GuiFont font);
3839
GuiFont gui_mch_get_font(char_u *name, int giveErrorIfMissing);
3940
char_u *gui_mch_get_fontname(GuiFont font, char_u *name);
4041
int gui_mch_init_font(char_u *font_name, int fontset);
@@ -72,7 +73,7 @@ int gui_mch_get_scrollbar_xpadding(void);
7273
int gui_mch_get_scrollbar_ypadding(void);
7374
void gui_mch_set_scrollbar_thumb(scrollbar_T *sb, long val, long size, long max);
7475
void gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height, int direction);
75-
void gui_mch_resize_view();
76+
void gui_mch_resize_view(void);
7677
void gui_mch_set_sp_color(guicolor_T color);
7778
void gui_mch_set_text_area_pos(int x, int y, int w, int h);
7879
void gui_mch_set_winpos(int x, int y);
@@ -83,7 +84,7 @@ void gui_mch_start_blink(void);
8384
void gui_mch_stop_blink(int may_call_gui_update_cursor);
8485
void gui_mch_toggle_tearoffs(int enable);
8586
void mch_set_mouse_shape(int shape);
86-
void gui_mch_def_colors();
87+
void gui_mch_def_colors(void);
8788
void ex_macaction(exarg_T *eap);
8889
void gui_make_popup(char_u *path_name, int mouse_pos);
8990

@@ -99,7 +100,7 @@ void gui_mch_enter_fullscreen(guicolor_T bg);
99100
void gui_mch_leave_fullscreen(void);
100101
void gui_mch_fuopt_update(void);
101102

102-
void gui_macvim_update_modified_flag();
103+
void gui_macvim_update_modified_flag(void);
103104
void gui_macvim_add_to_find_pboard(char_u *pat);
104105
void gui_macvim_set_antialias(int antialias);
105106
void gui_macvim_set_ligatures(int ligatures);
@@ -115,7 +116,7 @@ void odb_end(void);
115116
char_u *get_macaction_name(expand_T *xp, int idx);
116117
int is_valid_macaction(char_u *action);
117118

118-
void gui_macvim_wait_for_startup();
119+
void gui_macvim_wait_for_startup(void);
119120
void gui_macvim_get_window_layout(int *count, int *layout);
120121

121122
void gui_mch_find_dialog(exarg_T *eap);
@@ -132,7 +133,7 @@ void *gui_mch_register_sign(char_u *signfile);
132133

133134
void gui_mch_destroy_sign(void *sign);
134135

135-
void *gui_macvim_new_autoreleasepool();
136+
void *gui_macvim_new_autoreleasepool(void);
136137
void gui_macvim_release_autoreleasepool(void *pool);
137138

138139
void f_showdefinition(typval_T *argvars, typval_T *rettv);

0 commit comments

Comments
 (0)