Patch 8.1.1557
Problem:    Compiler warning for unused variables in tiny version. (Tony
            Mechelynck)
Solution:   Add #ifdef.
Files:      src/option.c


*** ../vim-8.1.1556/src/option.c        2019-06-15 17:12:01.569914997 +0200
--- src/option.c        2019-06-16 16:37:47.833801798 +0200
***************
*** 6135,6143 ****
      char_u    *s;
      char_u    **varp;
      char_u    *oldval;
      char_u    *oldval_l = NULL;
      char_u    *oldval_g = NULL;
- #if defined(FEAT_EVAL)
      char_u    *saved_oldval = NULL;
      char_u    *saved_oldval_l = NULL;
      char_u    *saved_oldval_g = NULL;
--- 6135,6143 ----
      char_u    *s;
      char_u    **varp;
      char_u    *oldval;
+ #if defined(FEAT_EVAL)
      char_u    *oldval_l = NULL;
      char_u    *oldval_g = NULL;
      char_u    *saved_oldval = NULL;
      char_u    *saved_oldval_l = NULL;
      char_u    *saved_oldval_g = NULL;
***************
*** 6158,6163 ****
--- 6158,6164 ----
                        ? OPT_GLOBAL : OPT_LOCAL)
                    : opt_flags);
        oldval = *varp;
+ #if defined(FEAT_EVAL)
        if ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0)
        {
            oldval_l = *(char_u **)get_varp_scope(&(options[opt_idx]),
***************
*** 6165,6170 ****
--- 6166,6172 ----
            oldval_g = *(char_u **)get_varp_scope(&(options[opt_idx]),
                                                                   OPT_GLOBAL);
        }
+ #endif
        *varp = s;
  
  #if defined(FEAT_EVAL)
***************
*** 8525,8531 ****
--- 8527,8535 ----
      int               opt_flags)              /* OPT_LOCAL and/or OPT_GLOBAL 
*/
  {
      int               old_value = *(int *)varp;
+ #if defined(FEAT_EVAL)
      int               old_global_value = 0;
+ #endif
  
      /* Disallow changing some options from secure mode */
      if ((secure
***************
*** 8535,8546 ****
--- 8539,8552 ----
                ) && (options[opt_idx].flags & P_SECURE))
        return e_secure;
  
+ #if defined(FEAT_EVAL)
      // Save the global value before changing anything. This is needed as for
      // a global-only option setting the "local value" in fact sets the global
      // value (since there is only one value).
      if ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0)
        old_global_value = *(int *)get_varp_scope(&(options[opt_idx]),
                                                                   OPT_GLOBAL);
+ #endif
  
      *(int *)varp = value;         /* set the new value */
  #ifdef FEAT_EVAL
***************
*** 9130,9137 ****
--- 9136,9145 ----
  {
      char      *errmsg = NULL;
      long      old_value = *(long *)varp;
+ #if defined(FEAT_EVAL)
      long      old_global_value = 0;   // only used when setting a local and
                                        // global option
+ #endif
      long      old_Rows = Rows;        // remember old Rows
      long      old_Columns = Columns;  // remember old Columns
      long      *pp = (long *)varp;
***************
*** 9144,9154 ****
                ) && (options[opt_idx].flags & P_SECURE))
        return e_secure;
  
      // Save the global value before changing anything. This is needed as for
      // a global-only option setting the "local value" infact sets the global
      // value (since there is only one value).
      if ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0)
!       old_global_value = *(long *)get_varp_scope(&(options[opt_idx]), 
OPT_GLOBAL);
  
      *pp = value;
  #ifdef FEAT_EVAL
--- 9152,9165 ----
                ) && (options[opt_idx].flags & P_SECURE))
        return e_secure;
  
+ #if defined(FEAT_EVAL)
      // Save the global value before changing anything. This is needed as for
      // a global-only option setting the "local value" infact sets the global
      // value (since there is only one value).
      if ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0)
!       old_global_value = *(long *)get_varp_scope(&(options[opt_idx]),
!                                                                  OPT_GLOBAL);
! #endif
  
      *pp = value;
  #ifdef FEAT_EVAL
*** ../vim-8.1.1556/src/version.c       2019-06-16 16:14:16.754801347 +0200
--- src/version.c       2019-06-16 16:38:50.145287805 +0200
***************
*** 779,780 ****
--- 779,782 ----
  {   /* Add new patch number below this line */
+ /**/
+     1557,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
208. Your goals for the future are obtaining an T1 connection and
     a 130 gig hard drive.

 /// 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/201906161442.x5GEgmMw011973%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui