1
0
forked from aniani/vim

patch 8.1.1557: compiler warning for unused variables in tiny version

Problem:    Compiler warning for unused variables in tiny version. (Tony
            Mechelynck)
Solution:   Add #ifdef.
This commit is contained in:
Bram Moolenaar
2019-06-16 16:41:41 +02:00
parent 8a5c7ef9bb
commit 983f2f1403
2 changed files with 15 additions and 2 deletions

View File

@@ -6135,9 +6135,9 @@ set_string_option(
char_u *s;
char_u **varp;
char_u *oldval;
#if defined(FEAT_EVAL)
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;
@@ -6158,6 +6158,7 @@ set_string_option(
? 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,6 +6166,7 @@ set_string_option(
oldval_g = *(char_u **)get_varp_scope(&(options[opt_idx]),
OPT_GLOBAL);
}
#endif
*varp = s;
#if defined(FEAT_EVAL)
@@ -8525,7 +8527,9 @@ set_bool_option(
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,12 +8539,14 @@ set_bool_option(
) && (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,8 +9136,10 @@ set_num_option(
{
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,11 +9152,14 @@ set_num_option(
) && (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);
old_global_value = *(long *)get_varp_scope(&(options[opt_idx]),
OPT_GLOBAL);
#endif
*pp = value;
#ifdef FEAT_EVAL

View File

@@ -777,6 +777,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1557,
/**/
1556,
/**/