vi: placate "warning: variable orig_buf set but not used"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -1070,10 +1070,13 @@ static void colon(char *buf)
|
|||||||
not_implemented(p);
|
not_implemented(p);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
char c, *orig_buf, *buf1, *q, *r;
|
char c, *buf1, *q, *r;
|
||||||
char *fn, cmd[MAX_INPUT_LEN], args[MAX_INPUT_LEN];
|
char *fn, cmd[MAX_INPUT_LEN], args[MAX_INPUT_LEN];
|
||||||
int i, l, li, b, e;
|
int i, l, li, b, e;
|
||||||
int useforce;
|
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
|
// :3154 // if (-e line 3154) goto it else stay put
|
||||||
// :4,33w! foo // write a portion of buffer to file "foo"
|
// :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 :%
|
// look for optional address(es) :. :1 :1,9 :'q,'a :%
|
||||||
buf = get_address(buf, &b, &e);
|
buf = get_address(buf, &b, &e);
|
||||||
|
|
||||||
|
# if ENABLE_FEATURE_VI_SEARCH || ENABLE_FEATURE_ALLOW_EXEC
|
||||||
// remember orig command line
|
// remember orig command line
|
||||||
orig_buf = buf;
|
orig_buf = buf;
|
||||||
|
# endif
|
||||||
|
|
||||||
// get the COMMAND into cmd[]
|
// get the COMMAND into cmd[]
|
||||||
buf1 = cmd;
|
buf1 = cmd;
|
||||||
@ -1398,6 +1403,7 @@ static void colon(char *buf)
|
|||||||
}
|
}
|
||||||
# endif /* FEATURE_VI_SETOPTS */
|
# endif /* FEATURE_VI_SETOPTS */
|
||||||
# endif /* FEATURE_VI_SET */
|
# endif /* FEATURE_VI_SET */
|
||||||
|
|
||||||
# if ENABLE_FEATURE_VI_SEARCH
|
# if ENABLE_FEATURE_VI_SEARCH
|
||||||
} else if (cmd[0] == 's') { // substitute a pattern with a replacement pattern
|
} else if (cmd[0] == 's') { // substitute a pattern with a replacement pattern
|
||||||
char *F, *R, *flags;
|
char *F, *R, *flags;
|
||||||
|
Reference in New Issue
Block a user