]> granicus.if.org Git - vim/commitdiff
patch 8.1.2064: MS-Windows: compiler warnings for unused arguments v8.1.2064
authorBram Moolenaar <Bram@vim.org>
Sat, 21 Sep 2019 21:09:04 +0000 (23:09 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 21 Sep 2019 21:09:04 +0000 (23:09 +0200)
Problem:    MS-Windows: compiler warnings for unused arguments.
Solution:   Add UNUSED. (Yegappan Lakshmanan, closes #4963)

13 files changed:
src/channel.c
src/ex_docmd.c
src/ex_getln.c
src/fileio.c
src/gui_w32.c
src/main.c
src/memline.c
src/os_mswin.c
src/os_win32.c
src/terminal.c
src/ui.c
src/undo.c
src/version.c

index f40d16ab966f417d0e24d27c804a83bb01751cb0..d5f4ecced7d0e91f5247a21abe88c8eb976f3bda 100644 (file)
@@ -577,7 +577,7 @@ messageFromServerGtk2(gpointer clientData,
 # endif
 
     static void
-channel_gui_register_one(channel_T *channel, ch_part_T part)
+channel_gui_register_one(channel_T *channel, ch_part_T part UNUSED)
 {
     if (!CH_HAS_GUI)
        return;
@@ -661,7 +661,7 @@ channel_gui_register_all(void)
 }
 
     static void
-channel_gui_unregister_one(channel_T *channel, ch_part_T part)
+channel_gui_unregister_one(channel_T *channel UNUSED, ch_part_T part UNUSED)
 {
 # ifdef FEAT_GUI_X11
     if (channel->ch_part[part].ch_inputHandler != (XtInputId)NULL)
@@ -5800,7 +5800,7 @@ job_check_ended(void)
     job_T *
 job_start(
        typval_T    *argvars,
-       char        **argv_arg,
+       char        **argv_arg UNUSED,
        jobopt_T    *opt_arg,
        int         is_terminal UNUSED)
 {
index d67bfac7b374d4425326918c642755ede16168ce..a4a87563542c24b9a493802df61619f15a02720d 100644 (file)
@@ -7335,7 +7335,7 @@ close_redir(void)
 
 #if (defined(FEAT_SESSION) || defined(FEAT_EVAL)) || defined(PROTO)
     int
-vim_mkdir_emsg(char_u *name, int prot)
+vim_mkdir_emsg(char_u *name, int prot UNUSED)
 {
     if (vim_mkdir(name, prot) != 0)
     {
index ef9967e9b3c6b7a3ef26316ac922dfe314424f04..ef8e387b70d927fb7b69d3f75071a263507f0a45 100644 (file)
@@ -3754,7 +3754,7 @@ ccheck_abbr(int c)
  * Returns the result in allocated memory.
  */
     char_u *
-vim_strsave_fnameescape(char_u *fname, int shell)
+vim_strsave_fnameescape(char_u *fname, int shell UNUSED)
 {
     char_u     *p;
 #ifdef BACKSLASH_IN_FILENAME
index 606359ade96452212ba196e87546608af3acd6dc..e0226f8c8c1fe23a76f49418b3cf1ef66bfd7c93 100644 (file)
@@ -2981,7 +2981,7 @@ set_file_time(
     int
 check_file_readonly(
     char_u     *fname,         /* full path to file */
-    int                perm)           /* known permissions on file */
+    int                perm UNUSED)    /* known permissions on file */
 {
 #ifndef USE_MCH_ACCESS
     int            fd = 0;
index c2371f40523ed75733f1c67b900957c80b3424a5..61b09e1395a59f6d849949289ff63598a332d47a 100644 (file)
@@ -6720,7 +6720,7 @@ gui_mch_dialog(
     char_u     *buttons,
     int                 dfltbutton,
     char_u     *textfield,
-    int                ex_cmd)
+    int                ex_cmd UNUSED)
 {
     WORD       *p, *pdlgtemplate, *pnumitems;
     DWORD      *dwp;
@@ -8517,7 +8517,7 @@ gui_mch_post_balloon(BalloonEval *beval, char_u *mesg)
 
     BalloonEval *
 gui_mch_create_beval_area(
-    void       *target,        /* ignored, always use s_textArea */
+    void       *target UNUSED, /* ignored, always use s_textArea */
     char_u     *mesg,
     void       (*mesgCB)(BalloonEval *, int),
     void       *clientData)
index 536378561fbbfa4f8c897dd91533d2fe6eec860b..c18fc6f116591aa67b23d61b6ba5a77f1d381061 100644 (file)
@@ -3658,7 +3658,7 @@ static struct timeval     prev_timeval;
  * Windows doesn't have gettimeofday(), although it does have struct timeval.
  */
     static int
-gettimeofday(struct timeval *tv, char *dummy)
+gettimeofday(struct timeval *tv, char *dummy UNUSED)
 {
     long t = clock();
     tv->tv_sec = t / CLOCKS_PER_SEC;
index 08a99f7f428cf66410a7c512621f1c95e5be2022..c77d1df9ee39683d94e5ab88039c250fb404e132 100644 (file)
@@ -2101,7 +2101,7 @@ static char       tz_cache[64];
     struct tm *
 vim_localtime(
     const time_t       *timep,         // timestamp for local representation
-    struct tm          *result)        // pointer to caller return buffer
+    struct tm          *result UNUSED) // pointer to caller return buffer
 {
 #ifdef HAVE_LOCALTIME_R
 # ifdef HAVE_TZSET
index 00b8caa960e852931d1519d93f13fcc243af8379..5fb4809d25196bca8b70f60f20e57c673c9637ab 100644 (file)
@@ -272,7 +272,7 @@ mch_input_isatty(void)
     void
 mch_settitle(
     char_u *title,
-    char_u *icon)
+    char_u *icon UNUSED)
 {
 # ifdef FEAT_GUI_MSWIN
 #  ifdef VIMDLL
@@ -1164,7 +1164,7 @@ AbortProc(HDC hdcPrn UNUSED, int iCode UNUSED)
 PrintHookProc(
        HWND hDlg,      // handle to dialog box
        UINT uiMsg,     // message identifier
-       WPARAM wParam,  // message parameter
+       WPARAM wParam UNUSED,   // message parameter
        LPARAM lParam   // message parameter
        )
 {
index 39b86d6ab6e2e704b6057766b476960b9ea0f7b8..3ce6057591b87fe27cf2625cc057aba7ba709c0f 100644 (file)
@@ -365,7 +365,7 @@ read_console_input(
 peek_console_input(
     HANDLE         hInput,
     INPUT_RECORD    *lpBuffer,
-    DWORD          nLength,
+    DWORD          nLength UNUSED,
     LPDWORD        lpEvents)
 {
     return read_console_input(hInput, lpBuffer, -1, lpEvents);
@@ -1006,7 +1006,7 @@ decode_key_event(
     WCHAR              *pch,
     WCHAR              *pch2,
     int                        *pmodifiers,
-    BOOL               fDoPost)
+    BOOL               fDoPost UNUSED)
 {
     int i;
     const int nModifs = pker->dwControlKeyState & (SHIFT | ALT | CTRL);
@@ -4486,7 +4486,7 @@ mch_system_g(char *cmd, int options)
 
 #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
     static int
-mch_system_c(char *cmd, int options)
+mch_system_c(char *cmd, int options UNUSED)
 {
     int                ret;
     WCHAR      *wcmd;
@@ -6456,7 +6456,7 @@ mch_remove(char_u *name)
  * Check for an "interrupt signal": CTRL-break or CTRL-C.
  */
     void
-mch_breakcheck(int force)
+mch_breakcheck(int force UNUSED)
 {
 #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
 # ifdef VIMDLL
@@ -7218,7 +7218,7 @@ fix_arg_enc(void)
 }
 
     int
-mch_setenv(char *var, char *value, int x)
+mch_setenv(char *var, char *value, int x UNUSED)
 {
     char_u     *envbuf;
     WCHAR      *p;
index 3d66bbb9b66320568a24ad4d10f89feadadce400..a8b7881f52b06243037925106e3febb80d1d0bce 100644 (file)
@@ -957,7 +957,7 @@ free_unused_terminals()
  * possible to do "1,5term vim -".
  */
     static ch_part_T
-get_tty_part(term_T *term)
+get_tty_part(term_T *term UNUSED)
 {
 #ifdef UNIX
     ch_part_T  parts[3] = {PART_IN, PART_OUT, PART_ERR};
@@ -5787,7 +5787,7 @@ dyn_conpty_init(int verbose)
 conpty_term_and_job_init(
        term_T      *term,
        typval_T    *argvar,
-       char        **argv,
+       char        **argv UNUSED,
        jobopt_T    *opt,
        jobopt_T    *orig_opt)
 {
@@ -6139,7 +6139,7 @@ dyn_winpty_init(int verbose)
 winpty_term_and_job_init(
        term_T      *term,
        typval_T    *argvar,
-       char        **argv,
+       char        **argv UNUSED,
        jobopt_T    *opt,
        jobopt_T    *orig_opt)
 {
index d3a655cbab8388ab43865ed87e6a24e23185612a..0170df7c7c4da45b905238e48a31d02579180015 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -649,7 +649,7 @@ ui_new_shellsize(void)
  * Return FAIL when not possible.
  */
     int
-ui_get_winpos(int *x, int *y, varnumber_T timeout)
+ui_get_winpos(int *x, int *y, varnumber_T timeout UNUSED)
 {
 # ifdef FEAT_GUI
     if (gui.in_use)
index 732efab9fd47f6c234a8b16e0dcd66a0187bdba4..2736f2a33dcdf79caf3b824b593ea9f473149127 100644 (file)
@@ -1784,7 +1784,7 @@ theend:
  * "hash[UNDO_HASH_SIZE]" must be the hash value of the buffer text.
  */
     void
-u_read_undo(char_u *name, char_u *hash, char_u *orig_name)
+u_read_undo(char_u *name, char_u *hash, char_u *orig_name UNUSED)
 {
     char_u     *file_name;
     FILE       *fp;
index 84add983415e3b1f6130779d8d76f466bb368644..ab5045c936f9e0f9172d368f4860bad315e3f44c 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2064,
 /**/
     2063,
 /**/