Patch 8.1.2064
Problem:    MS-Windows: compiler warnings for unused arguments.
Solution:   Add UNUSED. (Yegappan Lakshmanan, closes #4963)
Files:      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


*** ../vim-8.1.2063/src/channel.c       2019-09-16 22:55:57.732006874 +0200
--- src/channel.c       2019-09-21 23:07:21.352404060 +0200
***************
*** 577,583 ****
  # endif
  
      static void
! channel_gui_register_one(channel_T *channel, ch_part_T part)
  {
      if (!CH_HAS_GUI)
        return;
--- 577,583 ----
  # endif
  
      static void
! channel_gui_register_one(channel_T *channel, ch_part_T part UNUSED)
  {
      if (!CH_HAS_GUI)
        return;
***************
*** 661,667 ****
  }
  
      static void
! channel_gui_unregister_one(channel_T *channel, ch_part_T part)
  {
  # ifdef FEAT_GUI_X11
      if (channel->ch_part[part].ch_inputHandler != (XtInputId)NULL)
--- 661,667 ----
  }
  
      static void
! 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,5806 ****
      job_T *
  job_start(
        typval_T    *argvars,
!       char        **argv_arg,
        jobopt_T    *opt_arg,
        int         is_terminal UNUSED)
  {
--- 5800,5806 ----
      job_T *
  job_start(
        typval_T    *argvars,
!       char        **argv_arg UNUSED,
        jobopt_T    *opt_arg,
        int         is_terminal UNUSED)
  {
*** ../vim-8.1.2063/src/ex_docmd.c      2019-09-21 20:46:14.724275765 +0200
--- src/ex_docmd.c      2019-09-21 23:07:21.352404060 +0200
***************
*** 7335,7341 ****
  
  #if (defined(FEAT_SESSION) || defined(FEAT_EVAL)) || defined(PROTO)
      int
! vim_mkdir_emsg(char_u *name, int prot)
  {
      if (vim_mkdir(name, prot) != 0)
      {
--- 7335,7341 ----
  
  #if (defined(FEAT_SESSION) || defined(FEAT_EVAL)) || defined(PROTO)
      int
! vim_mkdir_emsg(char_u *name, int prot UNUSED)
  {
      if (vim_mkdir(name, prot) != 0)
      {
*** ../vim-8.1.2063/src/ex_getln.c      2019-09-21 20:46:14.724275765 +0200
--- src/ex_getln.c      2019-09-21 23:07:21.352404060 +0200
***************
*** 3754,3760 ****
   * Returns the result in allocated memory.
   */
      char_u *
! vim_strsave_fnameescape(char_u *fname, int shell)
  {
      char_u    *p;
  #ifdef BACKSLASH_IN_FILENAME
--- 3754,3760 ----
   * Returns the result in allocated memory.
   */
      char_u *
! vim_strsave_fnameescape(char_u *fname, int shell UNUSED)
  {
      char_u    *p;
  #ifdef BACKSLASH_IN_FILENAME
*** ../vim-8.1.2063/src/fileio.c        2019-08-20 20:13:40.322821973 +0200
--- src/fileio.c        2019-09-21 23:07:21.356404037 +0200
***************
*** 2981,2987 ****
      int
  check_file_readonly(
      char_u    *fname,         /* full path to file */
!     int               perm)           /* known permissions on file */
  {
  #ifndef USE_MCH_ACCESS
      int           fd = 0;
--- 2981,2987 ----
      int
  check_file_readonly(
      char_u    *fname,         /* full path to file */
!     int               perm UNUSED)    /* known permissions on file */
  {
  #ifndef USE_MCH_ACCESS
      int           fd = 0;
*** ../vim-8.1.2063/src/gui_w32.c       2019-09-04 13:53:16.801330174 +0200
--- src/gui_w32.c       2019-09-21 23:07:21.356404037 +0200
***************
*** 6720,6726 ****
      char_u    *buttons,
      int                dfltbutton,
      char_u    *textfield,
!     int               ex_cmd)
  {
      WORD      *p, *pdlgtemplate, *pnumitems;
      DWORD     *dwp;
--- 6720,6726 ----
      char_u    *buttons,
      int                dfltbutton,
      char_u    *textfield,
!     int               ex_cmd UNUSED)
  {
      WORD      *p, *pdlgtemplate, *pnumitems;
      DWORD     *dwp;
***************
*** 8517,8523 ****
  
      BalloonEval *
  gui_mch_create_beval_area(
!     void      *target,        /* ignored, always use s_textArea */
      char_u    *mesg,
      void      (*mesgCB)(BalloonEval *, int),
      void      *clientData)
--- 8517,8523 ----
  
      BalloonEval *
  gui_mch_create_beval_area(
!     void      *target UNUSED, /* ignored, always use s_textArea */
      char_u    *mesg,
      void      (*mesgCB)(BalloonEval *, int),
      void      *clientData)
*** ../vim-8.1.2063/src/main.c  2019-09-21 20:46:14.724275765 +0200
--- src/main.c  2019-09-21 23:07:21.356404037 +0200
***************
*** 3658,3664 ****
   * Windows doesn't have gettimeofday(), although it does have struct timeval.
   */
      static int
! gettimeofday(struct timeval *tv, char *dummy)
  {
      long t = clock();
      tv->tv_sec = t / CLOCKS_PER_SEC;
--- 3658,3664 ----
   * Windows doesn't have gettimeofday(), although it does have struct timeval.
   */
      static int
! gettimeofday(struct timeval *tv, char *dummy UNUSED)
  {
      long t = clock();
      tv->tv_sec = t / CLOCKS_PER_SEC;
*** ../vim-8.1.2063/src/memline.c       2019-09-04 18:53:08.485096735 +0200
--- src/memline.c       2019-09-21 23:07:21.356404037 +0200
***************
*** 2101,2107 ****
      struct tm *
  vim_localtime(
      const time_t      *timep,         // timestamp for local representation
!     struct tm         *result)        // pointer to caller return buffer
  {
  #ifdef HAVE_LOCALTIME_R
  # ifdef HAVE_TZSET
--- 2101,2107 ----
      struct tm *
  vim_localtime(
      const time_t      *timep,         // timestamp for local representation
!     struct tm         *result UNUSED) // pointer to caller return buffer
  {
  #ifdef HAVE_LOCALTIME_R
  # ifdef HAVE_TZSET
*** ../vim-8.1.2063/src/os_mswin.c      2019-08-01 13:55:32.740692500 +0200
--- src/os_mswin.c      2019-09-21 23:07:21.356404037 +0200
***************
*** 272,278 ****
      void
  mch_settitle(
      char_u *title,
!     char_u *icon)
  {
  # ifdef FEAT_GUI_MSWIN
  #  ifdef VIMDLL
--- 272,278 ----
      void
  mch_settitle(
      char_u *title,
!     char_u *icon UNUSED)
  {
  # ifdef FEAT_GUI_MSWIN
  #  ifdef VIMDLL
***************
*** 1164,1170 ****
  PrintHookProc(
        HWND hDlg,      // handle to dialog box
        UINT uiMsg,     // message identifier
!       WPARAM wParam,  // message parameter
        LPARAM lParam   // message parameter
        )
  {
--- 1164,1170 ----
  PrintHookProc(
        HWND hDlg,      // handle to dialog box
        UINT uiMsg,     // message identifier
!       WPARAM wParam UNUSED,   // message parameter
        LPARAM lParam   // message parameter
        )
  {
*** ../vim-8.1.2063/src/os_win32.c      2019-09-20 17:19:51.581551957 +0200
--- src/os_win32.c      2019-09-21 23:07:21.356404037 +0200
***************
*** 365,371 ****
  peek_console_input(
      HANDLE        hInput,
      INPUT_RECORD    *lpBuffer,
!     DWORD         nLength,
      LPDWORD       lpEvents)
  {
      return read_console_input(hInput, lpBuffer, -1, lpEvents);
--- 365,371 ----
  peek_console_input(
      HANDLE        hInput,
      INPUT_RECORD    *lpBuffer,
!     DWORD         nLength UNUSED,
      LPDWORD       lpEvents)
  {
      return read_console_input(hInput, lpBuffer, -1, lpEvents);
***************
*** 1006,1012 ****
      WCHAR             *pch,
      WCHAR             *pch2,
      int                       *pmodifiers,
!     BOOL              fDoPost)
  {
      int i;
      const int nModifs = pker->dwControlKeyState & (SHIFT | ALT | CTRL);
--- 1006,1012 ----
      WCHAR             *pch,
      WCHAR             *pch2,
      int                       *pmodifiers,
!     BOOL              fDoPost UNUSED)
  {
      int i;
      const int nModifs = pker->dwControlKeyState & (SHIFT | ALT | CTRL);
***************
*** 4486,4492 ****
  
  #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
      static int
! mch_system_c(char *cmd, int options)
  {
      int               ret;
      WCHAR     *wcmd;
--- 4486,4492 ----
  
  #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
      static int
! mch_system_c(char *cmd, int options UNUSED)
  {
      int               ret;
      WCHAR     *wcmd;
***************
*** 6456,6462 ****
   * Check for an "interrupt signal": CTRL-break or CTRL-C.
   */
      void
! mch_breakcheck(int force)
  {
  #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
  # ifdef VIMDLL
--- 6456,6462 ----
   * Check for an "interrupt signal": CTRL-break or CTRL-C.
   */
      void
! mch_breakcheck(int force UNUSED)
  {
  #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
  # ifdef VIMDLL
***************
*** 7218,7224 ****
  }
  
      int
! mch_setenv(char *var, char *value, int x)
  {
      char_u    *envbuf;
      WCHAR     *p;
--- 7218,7224 ----
  }
  
      int
! mch_setenv(char *var, char *value, int x UNUSED)
  {
      char_u    *envbuf;
      WCHAR     *p;
*** ../vim-8.1.2063/src/terminal.c      2019-09-10 21:27:15.175646978 +0200
--- src/terminal.c      2019-09-21 23:07:21.356404037 +0200
***************
*** 957,963 ****
   * possible to do "1,5term vim -".
   */
      static ch_part_T
! get_tty_part(term_T *term)
  {
  #ifdef UNIX
      ch_part_T parts[3] = {PART_IN, PART_OUT, PART_ERR};
--- 957,963 ----
   * possible to do "1,5term vim -".
   */
      static ch_part_T
! get_tty_part(term_T *term UNUSED)
  {
  #ifdef UNIX
      ch_part_T parts[3] = {PART_IN, PART_OUT, PART_ERR};
***************
*** 5787,5793 ****
  conpty_term_and_job_init(
        term_T      *term,
        typval_T    *argvar,
!       char        **argv,
        jobopt_T    *opt,
        jobopt_T    *orig_opt)
  {
--- 5787,5793 ----
  conpty_term_and_job_init(
        term_T      *term,
        typval_T    *argvar,
!       char        **argv UNUSED,
        jobopt_T    *opt,
        jobopt_T    *orig_opt)
  {
***************
*** 6139,6145 ****
  winpty_term_and_job_init(
        term_T      *term,
        typval_T    *argvar,
!       char        **argv,
        jobopt_T    *opt,
        jobopt_T    *orig_opt)
  {
--- 6139,6145 ----
  winpty_term_and_job_init(
        term_T      *term,
        typval_T    *argvar,
!       char        **argv UNUSED,
        jobopt_T    *opt,
        jobopt_T    *orig_opt)
  {
*** ../vim-8.1.2063/src/ui.c    2019-09-21 20:46:14.728275744 +0200
--- src/ui.c    2019-09-21 23:07:21.360404014 +0200
***************
*** 649,655 ****
   * Return FAIL when not possible.
   */
      int
! ui_get_winpos(int *x, int *y, varnumber_T timeout)
  {
  # ifdef FEAT_GUI
      if (gui.in_use)
--- 649,655 ----
   * Return FAIL when not possible.
   */
      int
! ui_get_winpos(int *x, int *y, varnumber_T timeout UNUSED)
  {
  # ifdef FEAT_GUI
      if (gui.in_use)
*** ../vim-8.1.2063/src/undo.c  2019-09-10 21:27:15.175646978 +0200
--- src/undo.c  2019-09-21 23:07:21.360404014 +0200
***************
*** 1784,1790 ****
   * "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)
  {
      char_u    *file_name;
      FILE      *fp;
--- 1784,1790 ----
   * "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 UNUSED)
  {
      char_u    *file_name;
      FILE      *fp;
*** ../vim-8.1.2063/src/version.c       2019-09-21 22:56:59.484287781 +0200
--- src/version.c       2019-09-21 23:08:07.500137248 +0200
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     2064,
  /**/

-- 
FATHER:       Make sure the Prince doesn't leave this room until I come and
              get him.
FIRST GUARD:  Not ... to leave the room ... even if you come and get him.
FATHER:       No.  Until I come and get him.
SECOND GUARD: Hic.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201909212113.x8LLDUQ0019656%40masaka.moolenaar.net.

Raspunde prin e-mail lui