summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-16 16:41:41 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-16 16:41:41 +0200
commit983f2f1403a591779f6edc4dd973c6cf31c65c8b (patch)
treeb1a9c77eca371645107b0adcde36fb7afa9710a1
parent8a5c7ef9bbded87abd8c937b16c576ed2ccbb805 (diff)
patch 8.1.1557: compiler warning for unused variables in tiny versionv8.1.1557
Problem: Compiler warning for unused variables in tiny version. (Tony Mechelynck) Solution: Add #ifdef.
-rw-r--r--src/option.c15
-rw-r--r--src/version.c2
2 files changed, 15 insertions, 2 deletions
diff --git a/src/option.c b/src/option.c
index 12a0816f3d..51d6212462 100644
--- a/src/option.c
+++ b/src/option.c
@@ -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
diff --git a/src/version.c b/src/version.c
index 4eb37a7513..f6bb71c89c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -778,6 +778,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1557,
+/**/
1556,
/**/
1555,