# HG changeset patch # User Christian Brabandt # Date 1485953104 -3600 # Node ID 04eb70c77cf422ae84a420c0c1a604a60399d1e1 # Parent 9b0e9cdb2aacef20463fbc5b813d6ad8f27b638c patch 8.0.0281: some files are still using ARGSUSED instead of UNUSED commit https://github.com/vim/vim/commit/1266d678bf2ed5072cca9381409536406f8d7b32 Author: Bram Moolenaar Date: Wed Feb 1 13:43:36 2017 +0100 patch 8.0.0281: some files are still using ARGSUSED instead of UNUSED Problem: MS-Windows files are still using ARGSUSED while most other files have UNUSED. Solution: Change ARGSUSED to UNUSED or delete it. diff --git a/src/gui_w32.c b/src/gui_w32.c --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -558,13 +558,12 @@ gui_mch_set_blinking(long wait, long on, blink_offtime = off; } -/* ARGSUSED */ static VOID CALLBACK _OnBlinkTimer( HWND hwnd, - UINT uMsg, + UINT uMsg UNUSED, UINT idEvent, - DWORD dwTime) + DWORD dwTime UNUSED) { MSG msg; @@ -590,7 +589,7 @@ gui_mch_set_blinking(long wait, long on, gui_update_cursor(TRUE, FALSE); blink_state = BLINK_ON; blink_timer = (UINT) SetTimer(NULL, 0, (UINT)blink_ontime, - (TIMERPROC)_OnBlinkTimer); + (TIMERPROC)_OnBlinkTimer); } } @@ -644,13 +643,12 @@ gui_mch_start_blink(void) * Call-back routines. */ -/*ARGSUSED*/ static VOID CALLBACK _OnTimer( HWND hwnd, - UINT uMsg, + UINT uMsg UNUSED, UINT idEvent, - DWORD dwTime) + DWORD dwTime UNUSED) { MSG msg; @@ -667,12 +665,11 @@ gui_mch_start_blink(void) s_wait_timer = 0; } -/*ARGSUSED*/ static void _OnDeadChar( - HWND hwnd, - UINT ch, - int cRepeat) + HWND hwnd UNUSED, + UINT ch UNUSED, + int cRepeat UNUSED) { dead_key = 1; } @@ -752,12 +749,11 @@ char_to_string(int ch, char_u *string, i /* * Key hit, add it to the input buffer. */ -/*ARGSUSED*/ static void _OnChar( - HWND hwnd, + HWND hwnd UNUSED, UINT ch, - int cRepeat) + int cRepeat UNUSED) { char_u string[40]; int len = 0; @@ -777,12 +773,11 @@ char_to_string(int ch, char_u *string, i /* * Alt-Key hit, add it to the input buffer. */ -/*ARGSUSED*/ static void _OnSysChar( - HWND hwnd, + HWND hwnd UNUSED, UINT cch, - int cRepeat) + int cRepeat UNUSED) { char_u string[40]; /* Enough for multibyte character */ int len; @@ -861,11 +856,10 @@ char_to_string(int ch, char_u *string, i gui_send_mouse_event(button, x, y, repeated_click, vim_modifiers); } -/*ARGSUSED*/ static void _OnMouseButtonDown( - HWND hwnd, - BOOL fDoubleClick, + HWND hwnd UNUSED, + BOOL fDoubleClick UNUSED, int x, int y, UINT keyFlags) @@ -960,10 +954,9 @@ char_to_string(int ch, char_u *string, i } } -/*ARGSUSED*/ static void _OnMouseMoveOrRelease( - HWND hwnd, + HWND hwnd UNUSED, int x, int y, UINT keyFlags) @@ -1038,13 +1031,12 @@ gui_mswin_find_menu( return pMenu; } -/*ARGSUSED*/ static void _OnMenu( - HWND hwnd, + HWND hwnd UNUSED, int id, - HWND hwndCtl, - UINT codeNotify) + HWND hwndCtl UNUSED, + UINT codeNotify UNUSED) { vimmenu_T *pMenu; @@ -1527,9 +1519,8 @@ gui_mch_get_font( * Return the name of font "font" in allocated memory. * Don't know how to get the actual name, thus use the provided name. */ -/*ARGSUSED*/ char_u * -gui_mch_get_fontname(GuiFont font, char_u *name) +gui_mch_get_fontname(GuiFont font UNUSED, char_u *name) { if (name == NULL) return NULL; @@ -2175,13 +2166,12 @@ gui_mch_enable_menu(int flag) #endif } -/*ARGSUSED*/ void gui_mch_set_menu_pos( - int x, - int y, - int w, - int h) + int x UNUSED, + int y UNUSED, + int w UNUSED, + int h UNUSED) { /* It will be in the right place anyway */ } @@ -2817,10 +2807,8 @@ gui_mch_show_popupmenu_at(vimmenu_T *men * Get this message when the user clicks on the cross in the top right corner * of a Windows95 window. */ -/*ARGSUSED*/ static void -_OnClose( - HWND hwnd) +_OnClose(HWND hwnd UNUSED) { gui_shell_closed(); } @@ -2829,8 +2817,7 @@ gui_mch_show_popupmenu_at(vimmenu_T *men * Get a message when the window is being destroyed. */ static void -_OnDestroy( - HWND hwnd) +_OnDestroy(HWND hwnd) { if (!destroying) _OnClose(hwnd); @@ -2883,11 +2870,10 @@ gui_mch_show_popupmenu_at(vimmenu_T *men } } -/*ARGSUSED*/ static void _OnSize( HWND hwnd, - UINT state, + UINT state UNUSED, int cx, int cy) { @@ -3124,9 +3110,8 @@ gui_mch_insert_lines( } -/*ARGSUSED*/ void -gui_mch_exit(int rc) +gui_mch_exit(int rc UNUSED) { #if defined(FEAT_DIRECTX) DWriteContext_Close(s_dwc); @@ -3285,9 +3270,8 @@ gui_mch_wide_font_changed(void) * Initialise vim to use the font with the given name. * Return FAIL if the font could not be loaded, OK otherwise. */ -/*ARGSUSED*/ int -gui_mch_init_font(char_u *font_name, int fontset) +gui_mch_init_font(char_u *font_name, int fontset UNUSED) { LOGFONT lf; GuiFont font = NOFONT; @@ -3416,11 +3400,10 @@ gui_mch_newfont(void) /* * Set the window title */ -/*ARGSUSED*/ void gui_mch_settitle( char_u *title, - char_u *icon) + char_u *icon UNUSED) { set_window_title(s_hwnd, (title == NULL ? "VIM" : (char *)title)); } @@ -3772,10 +3755,9 @@ gui_mch_browse( } #endif /* FEAT_BROWSE */ -/*ARGSUSED*/ static void _OnDropFiles( - HWND hwnd, + HWND hwnd UNUSED, HDROP hDrop) { #ifdef FEAT_WINDOWS @@ -3833,10 +3815,9 @@ gui_mch_browse( #endif } -/*ARGSUSED*/ static int _OnScroll( - HWND hwnd, + HWND hwnd UNUSED, HWND hwndCtl, UINT code, int pos) @@ -3954,7 +3935,6 @@ gui_mch_browse( * Return pointer to buffer in "tofree". * Returns zero when out of memory. */ -/*ARGSUSED*/ int get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree) { @@ -5588,10 +5568,14 @@ get_work_area(RECT *spi_rect) /* * Set the size of the window to the given width and height in pixels. */ -/*ARGSUSED*/ void -gui_mch_set_shellsize(int width, int height, - int min_width, int min_height, int base_width, int base_height, +gui_mch_set_shellsize( + int width, + int height, + int min_width UNUSED, + int min_height UNUSED, + int base_width UNUSED, + int base_height UNUSED, int direction) { RECT workarea_rect; @@ -5752,9 +5736,8 @@ gui_mch_set_sp_color(guicolor_T color) /* * handle WM_IME_NOTIFY message */ -/*ARGSUSED*/ static LRESULT -_OnImeNotify(HWND hWnd, DWORD dwCommand, DWORD dwData) +_OnImeNotify(HWND hWnd, DWORD dwCommand, DWORD dwData UNUSED) { LRESULT lResult = 0; HIMC hImc; @@ -5802,9 +5785,8 @@ gui_mch_set_sp_color(guicolor_T color) return lResult; } -/*ARGSUSED*/ static LRESULT -_OnImeComposition(HWND hwnd, WPARAM dbcs, LPARAM param) +_OnImeComposition(HWND hwnd, WPARAM dbcs UNUSED, LPARAM param) { char_u *ret; int len; @@ -6844,13 +6826,12 @@ gui_mch_menu_grey( * pressed, return that button's ID - IDCANCEL (2), which is the button's * number. */ -/*ARGSUSED*/ static LRESULT CALLBACK dialog_callback( HWND hwnd, UINT message, WPARAM wParam, - LPARAM lParam) + LPARAM lParam UNUSED) { if (message == WM_INITDIALOG) { @@ -8536,13 +8517,12 @@ delete_tooltip(BalloonEval *beval) PostMessage(beval->balloon, WM_CLOSE, 0, 0); } -/*ARGSUSED*/ static VOID CALLBACK BevalTimerProc( - HWND hwnd, - UINT uMsg, - UINT_PTR idEvent, - DWORD dwTime) + HWND hwnd UNUSED, + UINT uMsg UNUSED, + UINT_PTR idEvent UNUSED, + DWORD dwTime) { POINT pt; RECT rect; @@ -8578,16 +8558,14 @@ BevalTimerProc( } } -/*ARGSUSED*/ void -gui_mch_disable_beval_area(BalloonEval *beval) +gui_mch_disable_beval_area(BalloonEval *beval UNUSED) { // TRACE0("gui_mch_disable_beval_area {{{"); KillTimer(s_textArea, BevalTimerId); // TRACE0("gui_mch_disable_beval_area }}}"); } -/*ARGSUSED*/ void gui_mch_enable_beval_area(BalloonEval *beval) { @@ -8619,7 +8597,6 @@ gui_mch_post_balloon(BalloonEval *beval, // TRACE0("gui_mch_post_balloon }}}"); } -/*ARGSUSED*/ BalloonEval * gui_mch_create_beval_area( void *target, /* ignored, always use s_textArea */ @@ -8659,9 +8636,8 @@ gui_mch_create_beval_area( return beval; } -/*ARGSUSED*/ static void -Handle_WM_Notify(HWND hwnd, LPNMHDR pnmh) +Handle_WM_Notify(HWND hwnd UNUSED, LPNMHDR pnmh) { if (pnmh->idFrom != ID_BEVAL_TOOLTIP) /* it is not our tooltip */ return; diff --git a/src/os_mswin.c b/src/os_mswin.c --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -306,10 +306,8 @@ mch_settitle( * 2: Just restore icon (which we don't have) * 3: Restore title and icon (which we don't have) */ -/*ARGSUSED*/ void -mch_restore_title( - int which) +mch_restore_title(int which UNUSED) { #ifndef FEAT_GUI_MSWIN SetConsoleTitle(g_szOrigTitle); @@ -345,13 +343,12 @@ mch_can_restore_icon(void) * When 'shellslash' set do it the other way around. * Return OK or FAIL. */ -/*ARGSUSED*/ int mch_FullName( char_u *fname, char_u *buf, int len, - int force) + int force UNUSED) { int nResult = FAIL; @@ -636,9 +633,8 @@ vim_stat(const char *name, stat_T *stp) } #if defined(FEAT_GUI_MSWIN) || defined(PROTO) -/*ARGSUSED*/ void -mch_settmode(int tmode) +mch_settmode(int tmode UNUSED) { /* nothing to do */ } @@ -817,10 +813,8 @@ mch_char_avail(void) /* * set screen mode, always fails. */ -/*ARGSUSED*/ int -mch_screenmode( - char_u *arg) +mch_screenmode(char_u *arg UNUSED) { EMSG(_(e_screenmode)); return FAIL; @@ -996,10 +990,8 @@ mch_libcall( /* * Debugging helper: expose the MCH_WRITE_DUMP stuff to other modules */ -/*ARGSUSED*/ void -DumpPutS( - const char *psz) +DumpPutS(const char *psz UNUSED) { # ifdef MCH_WRITE_DUMP if (fdDump) @@ -1173,9 +1165,12 @@ swap_me(COLORREF colorref) # define PDP_RETVAL INT_PTR #endif -/*ARGSUSED*/ static PDP_RETVAL CALLBACK -PrintDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +PrintDlgProc( + HWND hDlg, + UINT message, + WPARAM wParam UNUSED, + LPARAM lParam UNUSED) { #ifdef FEAT_GETTEXT NONCLIENTMETRICS nm; @@ -1236,9 +1231,8 @@ PrintDlgProc(HWND hDlg, UINT message, WP return FALSE; } -/*ARGSUSED*/ static BOOL CALLBACK -AbortProc(HDC hdcPrn, int iCode) +AbortProc(HDC hdcPrn UNUSED, int iCode UNUSED) { MSG msg; @@ -1683,9 +1677,8 @@ mch_print_begin(prt_settings_T *psetting return (ret > 0); } -/*ARGSUSED*/ void -mch_print_end(prt_settings_T *psettings) +mch_print_end(prt_settings_T *psettings UNUSED) { EndDoc(prt_dlg.hDC); if (!*bUserAbort) @@ -2764,12 +2757,11 @@ points_to_pixels(char_u *str, char_u **e return pixels; } -/*ARGSUSED*/ static int CALLBACK font_enumproc( ENUMLOGFONT *elf, - NEWTEXTMETRIC *ntm, - int type, + NEWTEXTMETRIC *ntm UNUSED, + int type UNUSED, LPARAM lparam) { /* Return value: diff --git a/src/os_w32exe.c b/src/os_w32exe.c --- a/src/os_w32exe.c +++ b/src/os_w32exe.c @@ -38,13 +38,12 @@ void _cdecl SaveInst(HINSTANCE hInst); static void (_cdecl *pSaveInst)(HINSTANCE); #endif -/*ARGSUSED*/ int WINAPI WinMain( - HINSTANCE hInstance, - HINSTANCE hPrevInst, + HINSTANCE hInstance UNUSED, + HINSTANCE hPrevInst UNUSED, LPSTR lpszCmdLine, - int nCmdShow) + int nCmdShow UNUSED) { int argc = 0; char **argv; diff --git a/src/os_win32.c b/src/os_win32.c --- a/src/os_win32.c +++ b/src/os_win32.c @@ -620,14 +620,12 @@ dyn_libintl_end(void) dyn_libintl_wputenv = null_libintl_wputenv; } -/*ARGSUSED*/ static char * null_libintl_gettext(const char *msgid) { return (char*)msgid; } -/*ARGSUSED*/ static char * null_libintl_ngettext( const char *msgid, @@ -637,38 +635,36 @@ null_libintl_ngettext( return (char *)(n == 1 ? msgid : msgid_plural); } -/*ARGSUSED*/ static char * -null_libintl_bindtextdomain(const char *domainname, const char *dirname) +null_libintl_bindtextdomain( + const char *domainname UNUSED, + const char *dirname UNUSED) { return NULL; } -/*ARGSUSED*/ static char * -null_libintl_bind_textdomain_codeset(const char *domainname, - const char *codeset) +null_libintl_bind_textdomain_codeset( + const char *domainname UNUSED, + const char *codeset UNUSED) { return NULL; } -/*ARGSUSED*/ static char * -null_libintl_textdomain(const char *domainname) +null_libintl_textdomain(const char *domainname UNUSED) { return NULL; } -/*ARGSUSED*/ int -null_libintl_putenv(const char *envstring) +null_libintl_putenv(const char *envstring UNUSED) { return 0; } -/*ARGSUSED*/ int -null_libintl_wputenv(const wchar_t *envstring) +null_libintl_wputenv(const wchar_t *envstring UNUSED) { return 0; } @@ -1060,9 +1056,8 @@ decode_key_event( * For the GUI the mouse handling is in gui_w32.c. */ # ifdef FEAT_GUI_W32 -/*ARGSUSED*/ void -mch_setmouse(int on) +mch_setmouse(int on UNUSED) { } # else @@ -1658,13 +1653,12 @@ tgetch(int *pmodifiers, WCHAR *pch2) * If time == -1, wait forever for characters. * Returns the number of characters read into buf. */ -/*ARGSUSED*/ int mch_inchar( - char_u *buf, - int maxlen, - long time, - int tb_change_cnt) + char_u *buf UNUSED, + int maxlen UNUSED, + long time UNUSED, + int tb_change_cnt UNUSED) { #ifndef FEAT_GUI_W32 /* this isn't used for the GUI */ @@ -2592,11 +2586,10 @@ mch_exit(int r) /* * Do we have an interactive window? */ -/*ARGSUSED*/ int mch_check_win( - int argc, - char **argv) + int argc UNUSED, + char **argv UNUSED) { get_exe_name(); @@ -5348,11 +5341,10 @@ termcap_mode_end(void) #ifdef FEAT_GUI_W32 -/*ARGSUSED*/ void mch_write( - char_u *s, - int len) + char_u *s UNUSED, + int len UNUSED) { /* never used */ } @@ -6050,11 +6042,10 @@ mch_write( /* * Delay for "msec" milliseconds. */ -/*ARGSUSED*/ void mch_delay( long msec, - int ignoreinput) + int ignoreinput UNUSED) { #ifdef FEAT_GUI_W32 Sleep((int)msec); /* never wait for input */ @@ -6143,9 +6134,8 @@ mch_breakcheck(int force) /* * How much main memory in KiB that can be used by VIM. */ -/*ARGSUSED*/ long_u -mch_total_mem(int special) +mch_total_mem(int special UNUSED) { MEMORYSTATUSEX ms; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 281, +/**/ 280, /**/ 279, diff --git a/src/winclip.c b/src/winclip.c --- a/src/winclip.c +++ b/src/winclip.c @@ -10,7 +10,7 @@ /* * winclip.c * - * Routines common to both Win16 and Win32 for clipboard handling. + * Routines for Win32 clipboard handling. * Also used by Cygwin, using os_unix.c. */ @@ -214,9 +214,8 @@ typedef struct /* * Make vim the owner of the current selection. Return OK upon success. */ -/*ARGSUSED*/ int -clip_mch_own_selection(VimClipboard *cbd) +clip_mch_own_selection(VimClipboard *cbd UNUSED) { /* * Never actually own the clipboard. If another application sets the @@ -228,9 +227,8 @@ clip_mch_own_selection(VimClipboard *cbd /* * Make vim NOT the owner of the current selection. */ -/*ARGSUSED*/ void -clip_mch_lose_selection(VimClipboard *cbd) +clip_mch_lose_selection(VimClipboard *cbd UNUSED) { /* Nothing needs to be done here */ }