summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Ionescu-Idbohrn <cii@axis.com>2011-05-16 01:53:43 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2011-05-16 01:53:43 (GMT)
commit9a296fbeab604c9b64189b02a79654ec0aa68130 (patch)
treebaa65b9c6dbfbec67bd3c76578513a981edd4adb
parent662972a77acdd10357f6cbdba228d707bbdc02ed (diff)
downloadbusybox-9a296fbeab604c9b64189b02a79654ec0aa68130.tar.gz
busybox-9a296fbeab604c9b64189b02a79654ec0aa68130.tar.bz2
vi.c: remove warning: variable 'sp' set but not used
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--editors/vi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 638b3b7..e1f3724 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -1688,12 +1688,16 @@ static char *char_insert(char *p, char c) // insert the char c at 'p'
p = text_hole_delete(p, p); // shrink buffer 1 char
}
} else {
+#if ENABLE_FEATURE_VI_SETOPTS
// insert a char into text[]
char *sp; // "save p"
+#endif
if (c == 13)
c = '\n'; // translate \r to \n
+#if ENABLE_FEATURE_VI_SETOPTS
sp = p; // remember addr of insert
+#endif
p += 1 + stupid_insert(p, c); // insert the char
#if ENABLE_FEATURE_VI_SETOPTS
if (showmatch && strchr(")]}", *sp) != NULL) {