vi: placate "warning: variable orig_buf set but not used"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2018-06-27 15:11:36 +02:00
parent 4c58f246d4
commit 8825cb6660

View File

@ -1070,10 +1070,13 @@ static void colon(char *buf)
not_implemented(p);
#else
char c, *orig_buf, *buf1, *q, *r;
char c, *buf1, *q, *r;
char *fn, cmd[MAX_INPUT_LEN], args[MAX_INPUT_LEN];
int i, l, li, b, e;
int useforce;
# if ENABLE_FEATURE_VI_SEARCH || ENABLE_FEATURE_ALLOW_EXEC
char *orig_buf;
# endif
// :3154 // if (-e line 3154) goto it else stay put
// :4,33w! foo // write a portion of buffer to file "foo"
@ -1105,8 +1108,10 @@ static void colon(char *buf)
// look for optional address(es) :. :1 :1,9 :'q,'a :%
buf = get_address(buf, &b, &e);
# if ENABLE_FEATURE_VI_SEARCH || ENABLE_FEATURE_ALLOW_EXEC
// remember orig command line
orig_buf = buf;
# endif
// get the COMMAND into cmd[]
buf1 = cmd;
@ -1398,6 +1403,7 @@ static void colon(char *buf)
}
# endif /* FEATURE_VI_SETOPTS */
# endif /* FEATURE_VI_SET */
# if ENABLE_FEATURE_VI_SEARCH
} else if (cmd[0] == 's') { // substitute a pattern with a replacement pattern
char *F, *R, *flags;