]> granicus.if.org Git - vim/commitdiff
patch 8.1.1557: compiler warning for unused variables in tiny version v8.1.1557
authorBram Moolenaar <Bram@vim.org>
Sun, 16 Jun 2019 14:41:41 +0000 (16:41 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 16 Jun 2019 14:41:41 +0000 (16:41 +0200)
Problem:    Compiler warning for unused variables in tiny version. (Tony
            Mechelynck)
Solution:   Add #ifdef.

src/option.c
src/version.c

index 12a0816f3d3fc5cf30c06f1a9b999dee836d7c18..51d6212462f6308e6167cd61080bec3b6c51520b 100644 (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
index 4eb37a7513a52dd7cfa2cbe01a4105768901f779..f6bb71c89cb7ece565f66912e0291509f875c47a 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1557,
 /**/
     1556,
 /**/